I've started tracking an svn repository with git by cloning only its trunk directory. Now I want to track the other stuff, but I don't want to have to clone it again just to use --stdlayout since it takes a long time to download and I already have most of the code locally. How do I change the repository layout to match svn trunk/branches/tags scheme without having to clone again?
views:
175answers:
1
+5
A:
Old .git/config:
[svn-remote "svn"]
url = svn://host/project/trunk
fetch = :refs/remotes/git-svn
New .git/config:
[svn-remote "svn"]
url = svn://host/project
fetch = trunk:refs/remotes/git-svn
branches = branches/*:refs/remotes/*
tags = tags/*:refs/remotes/tags/*
Now run git svn reset -r1 -p; git svn fetch; git svn rebase.
No, it's not much different from doing a git svn clone anew -- adding branches means that git can see more merges which means the content git is tracking has changed so git-svn must regenerate everything.
ephemient
2009-10-17 15:38:58
Let me add that `git svn reset` will fail unless the release specified is not part of the project. I'm mentioning this as in some older versions the command would issue unclear error messages.
UncleZeiv
2010-07-08 11:47:39