Often I have a bunch of changes in my working copy that I would like to commit to different new branches, like this:
o third
o | second
o | | first
| | |
\ | /
o base
What I do then is:
- (on the "base" branch)
- create the first branch
- stage and commit a part of the changes
- stash the rest of the changes
- check out the base branch
- apply the stash
- create the second branch
- stage and commit the next part of the changes
- stash the rest of the changes
- ...
Git wouldn't just let me check out the base branch without stashing the rest of the changes, even though it wouldn't (and I think cannot) create a conflict.
Is there an easier way to do this?