【发布时间】: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