Update: as I suspected, this is a stupid exercise in wheel-reinventing, and I could've done git commit --fixup=<commitish>
all along. Thanks, Mudge.
For interactive rebase and autosquash background, see here.
All this helper does is construct commit messages that will be picked up by autosquash, using a commitish reference so you don't have to do the message yourself. If we know we have some changes that should've gone in the commit before last, and we don't want to add to its commit message, our workflow is now:
- make changes
- stage changes
$ fixup HEAD^
$ git rebase -i --autosquash
when ready