Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

svn2git: Cannot setup tracking information

Tags:

git

svn2git

I am trying to migrate a SVN project to git with thel help of svn2git. When executing the command it exits with the following error:

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. 

Started it with:

 svn2git http://<host>/<project>

I can't find any solution for it and it seems not many users has the same problem.

What can I do to solve this problem?

like image 568
pderaaij Avatar asked Jul 25 '13 07:07

pderaaij


2 Answers

I had the same problem using Debian Sid (the version of "git" is 1:1.8.3.2-1). Before I already failed on Debian Squeeze using the stock "git" package (1:1.7.2.5-3). Finally I ended up using the squeeze-backport repository (1:1.7.10.4-1~bpo60+1), and now it works.

What version of Git are you using?

like image 147
stucki Avatar answered Oct 09 '22 00:10

stucki


this should fix it:

Changing this line https://github.com/nirvdrum/svn2git/blob/master/lib/svn2git/migration.rb#L319
from run_command("git branch --track \"#{branch}\" \"remotes/svn/#{branch}\"")
to run_command("git branch \"#{branch}\" \"remotes/svn/#{branch}\"") should fix it.

At least it works now for me without any issues.

you can find the migration.rb file on Windows under C:\Ruby200-x64\lib\ruby\gems\2.0.0\gems\svn2git-2.2.2\lib\svn2git or something like this

https://github.com/nirvdrum/svn2git/issues/132#issuecomment-31453436

like image 28
Daniel Ruf Avatar answered Oct 09 '22 01:10

Daniel Ruf