【问题标题】:SVN to GIT Migration with commit history (Using git svn)SVN 到带有提交历史的 GIT 迁移(使用 git svn)
【发布时间】:2021-09-30 00:35:07
【问题描述】:

我需要将存储库从 SVN 迁移到 GIT(Bitbiucket) 以及提交历史记录和分支。阅读并探索了几篇文章,但在尝试来自以下 url 的以下命令时卡住了: https://davidzych.com/migrating-from-svn-to-git/

Step 1) git svn init http://url.to.svn/ --prefix svn
Step 2) git svn init http://url.to.svn/ -T Trunk -B Branches -t Tags
Step 3) git config svn.authorsfile ../authors.txt
Step 4) git svn fetch [Get stuck at this step and it doesn't move forward after a specific revision]
Step 5) git branch -a
Step 6) git tag -a -m "Migrating SVN tag" tag-name refs/tags/tag-name
Step 7) git remote add newrepo https://url.to.git/repo.git
Step 8) git push --all newrepo and git push --tags newrepo

我也尝试了以下网址中的步骤。 https://docs.microsoft.com/en-us/azure/devops/repos/git/create-new-repo?view=azure-devops

如果有其他更好的方法/步骤来进行此迁移,请提出建议。

【问题讨论】:

    标签: git svn version-control migration


    【解决方案1】:

    Bitbucket 有一个特殊的插件,称为 SVN Mirror。

    【讨论】:

    • 是否有任何手动步骤可以用于相同目的。我有一个使用 SVN 镜像插件作为最后一个选项的计划(因为它不是免费的)。
    • 据我所知,它有 30 天的试用期。如果你不需要长时间保持 SVN 和 Git 同步,只需要迁移一次,那么试用时间对你来说应该足够了。
    猜你喜欢
    • 2019-01-30
    • 2019-09-12
    • 1970-01-01
    • 1970-01-01
    • 2020-12-01
    • 1970-01-01
    • 2015-07-11
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多