Maintain set of local commits working with git-svn
- by benizi
I am using git to develop against a project hosted in subversion, using git-svn:
git svn clone svn://project/
My general workflow has been to repeatedly edit-and-commit on the master branch, then commit to the svn repository via:
git stash
git svn dcommit
git stash apply
One of the local modifications that 'stash' command is preserving, that I don't want to commit to the svn repository, is a changed database connection string. What's the most convenient way to keep this local change without the extra 'stash' steps?
I suspect that something like 'stash' or 'quilt' is what I'm looking for, but I'm still new enough to git that I think I'm missing some terminology that would lead to the exact incantation.
Update: The only solution I found that seems to avoid the git stash + git-svn action + git stash apply series was to update the git-svn ref manually:
(check in local-only change to 'master', then...)
$ cat .git/refs/master > .git/refs/remote/git-svn
$ git svn fetch (with at least one new SVN revision)
And that leaves the local-only commit as a weird (probably unsafe) commit between two svn revisions.