我试图在svn2git的帮助下将SVN项目迁移到git.执行命令时,它退出时出现以下错误:
Running command: git branch --track "0.0.9" "remotes/svn/0.0.9"
fatal: Cannot setup tracking information; starting point 'remotes/svn/0.0.9' is not a branch.
Run Code Online (Sandbox Code Playgroud)
开始于:
svn2git http://<host>/<project>
Run Code Online (Sandbox Code Playgroud)
我找不到任何解决方案,似乎没有多少用户有同样的问题.
我该怎么做才能解决这个问题?
小智 7
我使用Debian Sid遇到了同样的问题("git"的版本是1:1.8.3.2-1).在我使用股票"git"包(1:1.7.2.5-3)在Debian Squeeze上失败之前.最后我最终使用了squeeze-backport存储库(1:1.7.10.4-1~bpo60 + 1),现在它可以工作了.
你用的是什么版本的Git?
这应该解决它:
更改此行https://github.com/nirvdrum/svn2git/blob/master/lib/svn2git/migration.rb#L319
从run_command("git branch --track \"#{branch}\" \"remotes/svn/#{branch}\"")
到run_command("git branch \"#{branch}\" \"remotes/svn/#{branch}\"")
应该修复它.
至少它现在对我没有任何问题.
你可以migration.rb在Windows下找到该文件C:\Ruby200-x64\lib\ruby\gems\2.0.0\gems\svn2git-2.2.2\lib\svn2git或类似的东西
https://github.com/nirvdrum/svn2git/issues/132#issuecomment-31453436