If I want to change a past commit message, I know I can do
git reset HEAD .
git commit --amend -m "Correct commit message"
or
git stash save "WIP"
git rebase -i HEAD~
but is there any way to do it without stashing current work (or, for --amend
, making sure no changes are staged)?
This is for a commit that hasn't yet been pushed (or has been pushed into a feature branch that hasn't yet been merged).