Search code examples
git-svn

git-svn clone checkouts wrong repo?


So I am trying to switch to git, by using git-svn. I am having a svn repo called myrepo from which I want to clone just the project called myproject. The thing is that by running the following command:

git svn clone path-to-repo/myrepo/myproject --stdlayout --prefix=svn myproject

the whole repo myrepo is cloned rather than just myproject. I tried using -T, -t, -b as well to let git know about the layout of the project, but without any success. I always get the following output:

Using higher level of URL: path-to-repo/myrepo/myproject => path-to-repo/myrepo

and tries to clone that one. Am I doing something wrong? It might be that the svn repo layout could be broken or git incompatible ?


Solution

  • Meanwhile, I got it working with the usual -s switch:

    git svn clone -s <svn_repo_url>

    I also have a few git-svn references that I want to share:

    1. http://justaddwater.dk/2009/03/09/using-git-for-svn-repositories-workflow/
    2. http://www.viget.com/extend/effectively-using-git-with-subversion/
    3. http://utsl.gen.nz/talks/git-svn/intro.html
    4. http://trac.parrot.org/parrot/wiki/git-svn-tutorial