如何才能将 SVN 存储库导入到 git,但只能从(已知的)修订号及以后的版本号导入?
我试过:
git svn clone --authors-file=/home/ubuntu/svn-git-users.lst --revision=4151 -T trunk -b branch -t tags file://`pwd`/../svn-server-sync/MyRepo MyRepo
但它失败了:
r4151 = e80c7c5923700d6c7594c91f172779af63a8511b (refs/remotes/snapshots) fatal: refs/remotes/trunk: not a valid SHA1
有人可以帮我解决这个问题吗?
提前致谢。
最佳答案
跟进我的评论,这似乎是一个语法问题:
-r4151,
而不是 -r=4151
(不需要“等号”)。
问题How to git-svn clone the last n revisions from a Subversion repository?提供了一些很好的例子。
OP 报告正在尝试 -r4151:HEAD
,目前正在导入 SVN 存储库。
关于svn - 从给定时间点导入 svn 仓库到 git,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2765023/