My git-svn workflow looks something like this:
(on master) git svn rebase git checkout work ... make commits for all changes, including local-only and those I intend to push up git checkout master ... cherry-pick changes from work branch git svn dcommit git checkout work git rebase master
The final rebase step removes all commits from the working branch that have already been processed upstream.
For the cherry-pick step, I actually use a small shell script that automatically receives all commits except those that have "NOCOMMIT" in their description. You can use another indicator, such as "LOCAL" or "NOPUSH" or whatever. These commits are those that hang on the "work" branch and do not push towards Subversion.
Here is my pull-work script:
#!/bin/sh BRANCH=`git branch | grep ^\\* | cut -d' ' -f2` if [ $BRANCH != "master" ]; then echo "$0: Current branch is not master" exit 1 fi git log --pretty=oneline work...master | grep -v -E '(NOCOMMIT|DEBUG):' | cut -d' ' -f1 | tac | xargs -l git cherry-pick
Pay attention to the use of subtleties such as tac , which change the order of the listed commits so that they are applied to the master in the same order.
source share