I\'ve been trying to wrap my head around git branching models. I\'ve been looking at http://nvie.com/posts/a-successful-git-branching-model/ for some ideas and coming from Subv
In the case, you are working on branch "4.0" and have to make a fix on "3.1", you may rebase "4.0" after you commit "3.1":
Make sure you are on the feature branch 4.0:
git checkout 4.0
Save current work so you can check out other branch:
git stash
git checkout 3.1
Do editing and commit:
git commit -a -m "bug fix"
git checkout 4.0
Get back your changes:
git stash apply
Change 4.0 so it branches of the current head of "3.1":
git rebase "3.1"