Reputation: 3718
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?
Upvotes: 5
Views: 3409
Reputation: 1631
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
Upvotes: 0
Reputation: 15634
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
.
Upvotes: 3
Reputation: 12946
check these:
git-svn init --ignore-paths=<regex>
git-svn fetch --ignore-paths=<regex>
Upvotes: 0