I have cloned an existing SVN project via git svn clone with no problem so far, but in the mean time I have created a branch in Git only (not in SVN) and now i would like to synchronize this branch back to an SVN branch (not the trunk).
I have created the branch a little time ago. Is it possible to get back the information stored on that Git branch into SVN?
You can create a new branch in Subversion using
git svn branch. You might want to look at the example in this answer:In particular, a good tip in the linked tutorial is to use the
--dry-runoption tosvn dcommitto check that when you run the command for real, it’ll be pushing to the right branch.The Pro Git book has a clearer description of how
git svn dcommitdecides which svn branch to update. It sounds to me as if you should:git svn branch new-experimentremotes/new-experimentwithgit checkout --track -b new-experiment remotes/new-experimentRebase the changes from your old git topic branch (let’s suppose it’s called
experiment) ontonew-experiment:git svn dcommit --dry-runto check that the right subversion branch will be updatedgit svn dcommit