svn - 从给定时间点导入 svn 仓库到 git

标签 svn git git-svn

如何才能将 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/

相关文章:

svn - 通过 MacPorts 安装后在 Mac OS X Leopard 上找不到 git-svn

svn - 同步 Git 和 Svn

svn - 在centos上安装svn出现依赖错误

c# - Nuget 迁移的 Svn 外部 - 关注点

git - 将 git diff -S<string> 的结果传递给 git Restore/add -p

git - git 标签末尾的 '^{}' 是什么意思?

git - 如何查看最新执行的 `git pull`的日期和时间?

SVN:如何更改工作副本的所有者

git-svn:如何知道 git-svn 工作副本的当前 SVN 版本?

git-svn迁移致命: not a valid SHA1 update-ref refs/heads/master refs/remotes/trunk: command returned error: 128