How do I fetch a single branch using Git SVN fetch?
I am working with the Git SVN plugin with a SVN repository, every timeI do a git fetch it fetches all the branches changes all over SVN repository. it takes a long time after couple of hours with many commits over many branches
Can I tell it to fetch changes only for specific branches?
You can fetch the remote branch corresponding to your current HEAD by using git svn fetch --parent.
It's not possible to fetch from a single remote Subversion branch that isn't the parent branch, sadly. You can kick of a git svn fetch in the background, though; it won't affect your working copy at all. I have my computer set up to do the fetch automatically overnight using cron.
git-svn init --ignore-paths=<regex> git-svn fetch --ignore-paths=<regex>
We have experienced the same problem. Our solution was (to our great satisfaction) not to use fetch on SVN but to let git import all SVN tags, branches and trunk to git-like structure.
Our SVN repository wasn't even properly created (trunk/tags/branch directories), but it didn't matter.
git svn --tags PATH_TO_YOUR_TAGS --branches PATH_TO_YOUR_BRANCHES --trunk PATH_TO_YOUR_TRUNK svn+ssh://path.to.your.svn/repository
This will take really long time. After this, workflow is git-like. You commit and make branches like in git, then...
commit to SVN:
git svn dcommit
checkout from SVN: (in diff)
git svn rebase