I would do it like this. Say I'm on the master branch:
$ git branch
* master (is tracking the remotes/trunk svn branch)
So, on this branch I have a few local commits. Let's make a new branch based
on this one, called temp:
$ git branch temp
So, now let us bring our master/trunk back into the central subversion
state. Remember that your work is safe in the temp branch:
$ git reset --hard remotes/trunk
Now, let's create your feature branch in subversion:
$ git svn branch featureA
and check it out and track it as a svn branch:
$ git checkout -tb remotes/featureA featureA
So, our feature branch is ready. Let's get those commits of the temp branch:
$ git merge temp
and commit them to svn:
$ git svn dcommit
Done, your local work stored safely on a subversion branch.
All this being said, maybe you would be better off just pushing the git
branch ("temp") to a central/backup git repository. Our team does it like
that, cause working with Subversion branches is such a pain, and we all know
how to get stuff out of git branches.
You received this message because you are subscribed to the Google Groups "Git
for human beings" group.
To view this discussion on the web visit
To post to this group, send email to firstname.lastname@example.org.
To unsubscribe from this group, send email to
For more options, visit this group at