Search code examples
gitsvnbranchgit-svngit-extensions

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?


Solution

  • 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.