Working with git-svn

Merging

To handle svn:mergeinfo correctly use the following workflow:

$ git svn clone <url-to-svn-repository>
$ git checkout <svn-branchA>
$ <code code code>
$ git commit
$ git checkout <svn-branchA>
$ git svn rebase
$ git svn dcommit

Now follows the funny part

$ git checkout <svn-branchB>
$ git checkout -b merge_branchA
$ git cherry-pick <commit-ids-on-svn-branchA>
$ git rebase -i <svn-branchB> # to edit the commit message (possibly include svn revision numbers if you like)
$ git checkout <svn-branchB>

Create a merge commit

$ git merge --no-ff merge_branchA -m 'commit message'

git-svn should now update the svn:mergeinfo correctly

$ git svn dcommit