将SVN迁移到git不会将标记迁移到DevOps


不丶离
2025-01-18 04:06:20 (1月前)


我将存储库从自己的subversion服务器迁移到Azure DevOps git存储库。为此,我正在使用下一个命令:

#克隆
git svn clone –stdlayout –authors-file = autors.txt“http:// www ….

3 条回复
  1. 0# 纾潆锦袖迷子 | 2019-08-31 10-32



    我相信您应该使用以下命令将数据推送到DevOps:




    1. git push -u all follow-tags origin

    2. </code>


    使用此命令,应将所有内容发送到原点,包括标记。



    顺便说一句,还有另一个工具允许将数据从SVN转换为Git,它的名字是SubGit:




    https://subgit.com



    它允许导入更复杂的存储库,可能对您正在做的事情有所帮助。


  2. 1# 小狮子 | 2019-08-31 10-32



    源自

    这个帖子

    ,这是我们正在使用的(不使用DevOps,但在GitLab和GitHub上工作):




    1. git svn clone https://…….

    2. Create repo on hosting service

      cd
      git for-each-ref format=’%(refname)’ refs/remotes/origin/tags | cut -d/ -f5 | while read ref; do
      git tag -a $ref -m $(git log pretty=oneline refs/remotes/origin/tags/$ref | head -n1 | cut -d -f2-)” refs/remotes/origin/tags/$ref
      git update-ref -d refs/remotes/origin/tags/$ref
      done
      git remote add origin ………….
      git push origin refs/remotes/origin/:refs/heads/
      git push origin tags

    3. </code>

登录 后才能参与评论