6

What is the best practice here?

The repository in question is here: http://svn.osqa.net/svnroot/osqa/

ripper234
  • 222,824
  • 274
  • 634
  • 905

2 Answers2

8

I'd clone everything in the first place, just in case you need the other branches later, with:

git svn clone --stdlayout http://svn.osqa.net/svnroot/osqa/

In this case I can't see any particular reason not to, since even with all the branches a git svn clone of the repository only ends up being 11 megabytes. It'll make things easier later if you are interested in the other branches.

Mark Longair
  • 446,582
  • 72
  • 411
  • 327
  • Wait, the clone finished for you already? For me it's running for ages... :( – ripper234 Mar 19 '11 at 10:31
  • I didn't use the --stdlayout switch. Should I have? http://stackoverflow.com/questions/5361559/what-does-the-stdlayout-do-in-git-svn-clone – ripper234 Mar 19 '11 at 10:34
  • Cool, now that I understand --stdlayout, it seems only reasonable to clone all the branches. – ripper234 Mar 19 '11 at 10:42
  • Well, that's what I'm suggesting in my answer :) If the layout of the repository is as default (which is the case with the repository you mention) then that's an easy way of grabbing all the branches and tags. – Mark Longair Mar 19 '11 at 10:44
1

The problem is that subversion branches are exposed (usually, and in your case) via a standard naming convention of TOPLEVEL/branches/.... The way git does it is not so explicit - that is, if you do a git checkout BRANCH_NAME, the branch files are "swapped in" to your current working directory.

With this in mind, I'd suggest only importing trunk, and then importing all the directories in the TOPLEVEL/branches/branchname directory as git branches as you need them.

rlotun
  • 7,897
  • 4
  • 28
  • 23