How to run git svn rebase on all branches

I'm using git-svn to manage a Subversion repository using git. I usually have a large number of git branches at any one time.

I often need to update them to match the latest code in the repository, but find it a pain to run git checkout <branch>; git svn rebase git checkout <branch>; git svn rebase for every branch.

Is there a simpler way of doing this than writing a script (which would need to deal with conflicts)?

EDIT : Since the slowest part of the process is contacting the subversion server and downloading the updates, it's faster to run git svn rebase on one branch and then git svn rebase --local on the rest.

Is there an even better way?


I think your edit has the solution on the nose:

Since the slowest part of the process is contacting the subversion server and downloading the updates, it's faster to run git svn rebase on one branch and then git rebase git-svn on the rest.

I also work with a lot of local git branches for my git-svn repositories, and find myself rebasing them daily to keep them as close to the remote branch as possible. Using a single tracking branch to track the remote branch, and then rebasing/merging each branch from that seems to be the most efficient means of managing this particular situation from my own limited experience.

链接地址: http://www.djcxy.com/p/66696.html

上一篇: 我如何使用PDO插入NULL值?

下一篇: 如何在所有分支上运行git svn rebase