svn2git: command failed: 2>&1 git checkout -f master

I must be too dumb for the existing svn2git solutions, since I have started with

http://john.albin.net/git/convert-subversion-to-git

proceeded to

https://github.com/JohnAlbin/git-svn-migrate

and am now trying to import a simple (what appears to be a standard) svn project using your approach with snv2git, which quits my attempts with a nonchalant ‘command failed’:

$ svn2git http://apt-cyg.googlecode.com/svn  --verbose
Running command: git svn init --prefix=svn/ --no-metadata --trunk=trunk --tags=tags --branches=branches http://apt-cyg.googlecode.com/svn
Running command: git svn fetch 
Running command: git branch -l --no-color
Running command: git branch -r --no-color
Running command: git config --local --get user.name
Running command: git config --local --get user.email
Running command: git checkout -f master
error: pathspec 'master' did not match any file(s) known to git.
command failed:
2>&1 git checkout -f master

The same happens when I invoke the command as follows:

$ svn2git http://apt-cyg.googlecode.com/svn/trunk  --verbose

Truly, I don’t believe a very much simpler svn project can be found to convert; no branches, no tags, no nothing, only a trunk.

About this issue

  • Original URL
  • State: closed
  • Created 12 years ago
  • Comments: 27 (7 by maintainers)

Most upvoted comments

I got around this by removing the .git directory from the working directory. It was created during previous failed attempts at running svn2git. I also needed --rootistrunk.

Hi guys, instead of use --rootistrunk which creates to me a “xxx is not a complete URL” issue like @ktalik said… I used --notrunk and worked like a charm.

I had exactly same issue, it turned out the cause was that I had a “non-standard repository layout”, ie. no trunk/, branches/ or tags/ directories at the top.

All I needed to do is add --rootistrunk to the svn2git command.