git-svn问题

cor*_*ras 4 git git-svn

是否可以克隆具有多个修订版的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:~#
Run Code Online (Sandbox Code Playgroud)

尝试再次键入命令继续结帐会导致以下结果:

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
Run Code Online (Sandbox Code Playgroud)

cor*_*ras 5

找到了答案.使用ubuntu附带的git版本时必定存在某种错误.以下行在新创建的.git/config文件中出现两次:

svn-remote.svn.fetch=:refs/remotes/git-svn
svn-remote.svn.fetch=:refs/remotes/git-svn
Run Code Online (Sandbox Code Playgroud)

删除副本允许我键入一个git svn fetch似乎继续结帐的东西.