可以克隆一个有多个版本的git存储库吗?我们尝试这样做,在第1000次提交后,它执行GC并退出,使克隆处于不可用状态。
r998 = a5cb4f6a377b0ca80cd95d73b0e32f0552b9cdfd (git-svn)
M trunk/asdf/asdf.java
r999 = a87b06ae8aa497bb28c294b7ff8668ce2e4c8fcc (git-svn)
D tags/sdafasdf/asdfasdf.java
r1000 = 20b383d138499eee4f121079ae059458f3facc94 (git-svn)
Auto packing your repository for optimum performance. You may also
run "git gc" manually. See "git help gc" for more information.
Counting objects: 18103, done.
Compressing objects: 61% (10590/17116) 7116)
Compressing objects: 100% (17116/17116), done.
Writing objects: 100% (18103/18103), done.
Total 18103 (delta 9301), reused 0 (delta 0)
Removing duplicate objects: 100% (256/256), done.
root@host:~#尝试通过再次键入该命令来继续检出将导致以下结果:
root@host:~/repo# git svn clone https://host/svn/repo
Remote ref refs/remote/git-svn is tracked by
"svn-remote.svn.fetch=:refs/remotes/git-svn"
and
"svn-remote.svn.fetch=:refs/remotes/git-svn"
Please resolve this ambiguity in your git configuration file before continuing发布于 2009-11-17 07:11:07
找到了答案。在使用ubuntu附带的git版本时,一定存在某种bug。以下行在新创建的.git/config文件中出现两次:
svn-remote.svn.fetch=:refs/remotes/git-svn
svn-remote.svn.fetch=:refs/remotes/git-svn删除重复项后,我可以键入一个似乎正在继续结帐的git svn fetch。
发布于 2009-11-11 12:29:36
这在我身上发生了很多次。我只是重新运行了一次完全相同的git命令,它从它停止的地方继续运行。最终它走到了尽头,一切都正常了。
编辑:如果在运行git svn clone ...时出现此问题,则需要在重新运行命令时将clone替换为fetch。
发布于 2009-11-11 12:28:11
是。它应该工作得很好。我使用以下命令克隆了Mono项目存储库(超过140k修订版):
$ mkdir mono
$ cd mono
$ git init
$ git svn init svn+ssh://foo@mono-cvs.ximian.com/source
$ git config svn-remote.svn.fetch trunk/mono:refs/remotes/git-svn/trunk
$ git config svn-remote.svn.branches branches/*/mono:refs/remotes/git-svn/branches/*
$ git config svn-remote.svn.tags tags/*/mono:refs/remotes/git-svn/tags/*
$ git fetch git://repo.or.cz/mono.git refs/heads/master:refs/remotes/git-svn/trunk refs/heads/branches/*:refs/remotes/git-svn/branches/* refs/tags/*:refs/remotes/git-svn/tags/*
$ git reset --hard git-svn/trunk一切都很顺利。这和你正在做的事情相似吗?
https://stackoverflow.com/questions/1712956
复制相似问题