2

I'm using git-svn to checkout a standard SVN repository such as this one:

http://example.com/
    - trunk
    - branches
    - tags

with this command:

git svn clone -s http://example.com/

The problem is that git-svn is creating a "trunk" sub-directory in the target folder. Instead of having this kind of directory structure:

c:\www\example

I'm having this:

c:\www\example\trunk

So how to prevent git-svn from putting everything in this trunk folder, while still using the standard SVN layout? Basically, I would want "c:\www\example" to contain whatever I'm currently working on, whether it's the trunk, a branch or a tag. On the other hand, I also need git-svn to correctly map the git branches and tags to the correct SVN folders. Can this be done with git-svn or am I missing something?

2
  • 2
    Maybe you should run: "git svn clone -s example.com ." (dot at the end tells git-svn to clone into the current directory, see "git svn --help" for more information). Commented Jul 26, 2012 at 9:08
  • @DmitryPavlenko, yes that was it. Feel free to post your comment as an answer and I'll accept it. Commented Jul 27, 2012 at 6:16

1 Answer 1

5

You should run:

git svn clone -s http://example.com/ .

(dot at the end tells git-svn to clone into the current directory, see git svn --help for more information).

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.