How to run git svn rebase on all branches

I am using git-svn to manage the Subversion repository using git. I usually have a large number of git branches at any given time.

I often need to update them so that they match the latest code in the repository, but I find that it hurts to run git checkout <branch>; git svn rebase git checkout <branch>; git svn rebase for each branch.

Is there an easier way to do this than writing a script (which would have to deal with conflicts)?

EDIT . Since the slowest part of the process contacts the subversion server and downloads the updates, it’s faster to run git svn rebase on one branch and then git svn rebase --local on the rest.

Is there any better way?

+7
source share
1 answer

I think your editing has a solution on the nose:

Since the slowest part of the process contacts the subversion server and downloads the updates, git svn rebase runs on one branch faster and then git rebase git-svn on the others.

I also work with a lot of local git branches for my git-svn repositories, and every day I tweak them to get them as close to the remote branch as possible. Using one tracking branch to track a remote branch and then reloading / merging each branch with it seems to be the most effective way to manage this particular situation from my own limited experience.

+4
source

All Articles