Re:Write good git commit messages
by tome on Monday December 17, 2018 @06:44AM
(#18698354)
You indeed have to recommit everything (which I prefer) but you don't have to reset anything (since nothing is in the staging area).
[ Parent
| on HN ]
>> If you end up staging the wrong hunk, then you will have to reset and recommit
> you don't have to reset anything
You have to reset the branch pointer to the previous commit, but I think using the --amend switch may do that for you.
If you exit the commit message editor so that it retuns a non-zero exit code to git then nothing is committed and nothing is staged.