Using git-svn it is quite beautiful to use my local git as a svn client.
Unfortunately it seems not to be possible to restrict git svn to some branches?
got
One '*' is needed in glob: 'branches/v10'
when setting up two branches
lines in gitconfig with fixed branch paths
url = https://example.com/svn/reps/test
fetch = trunk:refs/remotes/trunk
branches = branches/v10:refs/remotes/v10
branches = branches/v09:refs/remotes/v09
Is there a way to get around WITHOUT using different SVN remotes (which causes, index will blow up cause branch points are not just "patches/copies" from trunk and all the "trunk" history will come in again ;(
EDIT: To clearify what I intend: There is a huge SVN repository with n branches. In SVN, I'll checkout just two branches in two different workspaces I need to work for. In Git, the DVCS aspect will "clone" the whole SVN repository, including ALL informations of ALL SVN branches (think about a repository with > 50.000 changesets). I intended to keep the disk usage as small as possible on my local machine. Therefore I thought about, set up git for just two specific branches I need (v10 and v09). So I still have the great merge features within this git repository but doesn't need to clone all the stuff I don't need (and never will need to). Another aspect than "Disc usage" is the problem, that cloning the complete SVN repository t开发者_如何转开发akes very, very... (did I say very) long!
The solution to this is in the manual. At the end of svn manpage
, the following comment was found:
It is also possible to fetch a subset of branches or tags by using a comma-separated list of names within braces. For example:
[svn-remote "huge-project"]
url = http://server.org/svn
fetch = trunk/src:refs/remotes/trunk
branches = branches/{red,green}/src:refs/remotes/branches/*
tags = tags/{1.0,2.0}/src:refs/remotes/tags/*
精彩评论