Perhaps I’m missing something about using gi through svn, but how do I keep around a set of locally modified files without pushing those changes to subversion.
Here’s my broken workflow.
(on master) git svn rebase
git checkout -b issue
*apply changes I need on all my branches*
*changes*
git commit *changes*
git checkout master
git merge issue
git svn dcommit
The problem lies in the fact that svn rebase, or even committing, I lose my locally modified but not checked in files. I don’t want to commit the files, because I don’t want them pulled into an svn commit.
How is my workflow supposed to work in a situation like this?
My git-svn workflow looks something like this:
The last
rebasestep removes all the commits from the work branch that have already been committed upstream.For the
cherry-pickstep, I actually use a small shell script that automatically gets all the commits except those that have “NOCOMMIT” in their description. You could use another indicator like “LOCAL” or “NOPUSH” or whatever you like. These commits are those which hang around on the “work” branch and aren’t pushed up to Subversion.Here’s my
pull-workscript:Note the use of subtleties like
tacthat reverse the order of the listed commits so they get applied to master in the same order.