I'm using git-svn to work against svn repository. The layout is standard, and I have created the local repository with:
$ git svn clone -s http://mysvnrepo
(master)$
I need to work on a remote (svn) branch - MyBranch, so I created a local branch to track the remote one:
(master)$ git checkout -b localMyBranch remotes/MyBranch
(localMyBranch)$
I keep working and committing to the local branch as I go, and occasionally I do dcommit:
(localMyBranch)$ git svn dcommit
Meanwhile other people are working on the trunk, and from time to time I want to merge back the changes from trunk to my branch to keep them in sync. That's where I get really confused, as I could not find a good information how to perform this. So far I know that I need to do:
(localMyBranch)$ git svn dcommit
(localMyBranch)$ git checkout master
(master)$ git svn rebase
Now what? I read that this is NOT the right way to go:
(master)$ git checkout localMyBranch
(localMyBranch)$ git rebase master
As it's going to mess the merge info for svn.
So what is the best way to "rebase" my remote svn branch to the remote trunk, preserving the merge info for svn?