Enter: git-svn. I love git-svn because I can exist in a svn environment without giving up all the things I love about git. One thing that continually escapes my memory is how to create a svn branch from the git CLI as well as how to associate a git branch with a svn branch.
This blog entry is my own cheat-sheet.
Say, I want to create a svn branch off of the trunk. Here's what I would do:
$ git checkout master
$ git svn rebase
$ git svn branch -m "Creating a feature branch" feature_1001
$ git svn dcommit
$ git checkout -b my_feature_1001 feature_1001
Another thing that isn't so intuitive is merging your changes back to trunk when you're done. Here's what I would do:
$ git checkout feature_1001
$ git rebase master
$ git checkout master
$ git merge feature_1001
$ git svn dcommit
$ git branch -D feature_1001
Then I have to use a svn client to actually delete the svn branch.
Also, if a svn branch is removed, you need to remove it by hand from git with
$ git branch -rd feature_1001
$ git checkout feature_1001
$ git rebase master
$ git checkout master
$ git merge feature_1001
$ git svn dcommit
$ git branch -D feature_1001
Then I have to use a svn client to actually delete the svn branch.
Also, if a svn branch is removed, you need to remove it by hand from git with
$ git branch -rd feature_1001