Maintain set of local commits working with git-svn

Posted by benizi on Stack Overflow See other posts from Stack Overflow or by benizi
Published on 2010-03-01T23:22:47Z Indexed on 2010/03/19 12:51 UTC
Read the original article Hit count: 555

Filed under:
|
|
|

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.

© Stack Overflow or respective owner

Related posts about git

Related posts about git-svn