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 takes very, very... (did I say very) long!
git-svn is a specialized tool for Git users to interact with Git repositories. It works by providing a Git frontend to an SVN backend. With git-svn, you use Git commands on the local repository, so it's just like using normal Git. However, behind the scenes, the relevant SVN commands are sent to the server.
Creating a branch is simple. All you need to do is make a copy of your project using "svn copy". This command will require the URL of your project's /trunk directory as well as the URL of the directory where you want to create your branch. This location will virtually always be inside of your /branches directory.
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/*
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With