I've got a dirty working tree with changes that are destined for two different branches:
The
student
branch will get documentation with lab problems and some infrastructure.The
solutions
branch will get working code.
My usual workflow is to go through files hunk by hunk and try to commit things that go together. But in this case, I want to send some commits to the student
branch and other commits to the solutions
branch. I feel like there must be a nice way to do this, but I'm not thinking of it. Here are two ideas that might work:
Commit everything to one branch, then use cherry picking to move the ones that don't belong. I'll have to label each commit with what goes where, and then once the commits are moved, I'll have to edit all the labels.
Stash everything, then separately pop the stashes each into its own branch. But then I'll have to retype every commit message.
Suggestions warmly appreciated!