Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git svn ambiguous argument 'HEAD'

Tags:

git

svn

   $ git svn clone -s http://a_repo local_dir ( by default this brings me r1 ) to hdd
    Initialized empty Git repository in d:/Temp/local_dir/.git/
    r1 = some_SHA (refs/remotes/trunk)

   $ cd local_dir
   $ git svn rebase
   fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
   Use '--' to separate paths from revisions
   log --no-color --no-decorate --first-parent --pretty=medium HEAD: command returned error: 128

How can I actually checkout the repo?

I also tried without rebasing, to use fetch, but it only brings one revision at a time. We have several thousand commits, at this rate, it will take days to copy the repository.

like image 830
Senthess Avatar asked Aug 02 '11 12:08

Senthess


1 Answers

If you get only one commit out of your SVN repo, I assume that the SVN repo is not in standard layout but you tell git svn that it is.

git svn clone http://a_repo local_dir

(i.e. without the -s flag) should be able to clone the SVN repo. If this works, retry the clone and specify your trunk, tags and branches directories as described in the docs of git-svn.

like image 82
eckes Avatar answered Oct 10 '22 22:10

eckes