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-run
option to svn dcommit
to 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 dcommit
decides which svn branch to update. It sounds to me as if you should:
- Create a new svn branch using
git svn branch new-experiment
- Create a local branch to track
remotes/new-experiment
with git checkout --track -b new-experiment remotes/new-experiment
Rebase the changes from your old git topic branch (let's suppose it's called experiment
) onto new-experiment
:
git checkout experiment
git branch original-experiment
git rebase new-experiment
git checkout new-experiment
git merge experiment
- Try
git svn dcommit --dry-run
to check that the right subversion branch will be updated
- If so, do
git svn dcommit