I've started playing with git locally, and have come up against a use case that I'm not sure how best to handle.
I'm working on a spike in a branch, but then come across a simple correction that should also apply to master. The best I've found for the moment is:
git stash
git checkout master
//do my correction manually
git commit -a
git checkout spike
git pop
Seems a bit long winded, just for one line, and it involves me doing the same correction twice. I can't help feeling there must be a better way of doing this. In your answer, please also consider the case where there are other changes in the same file which I don't want to take.