git-svn clone checkouts wrong repo?

Viewed 15572

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 ?

4 Answers

Make sure that you specify a full path to myproject it seems like partial paths are not handled well by the fetch part of the clone operation. You may use the colon in that path on Windows (e.g. c:\myproject) (but may not use a colon in the source repository path).

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