I recently $ git add .
some changes I made to one of my repositories followed by $ git commit -m'INcorrect commit message'
.
I decided to change the incorrect commit message to 'Correct commit message' using:
$ git commit --amend
The instructions I followed to do this can be found here: https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages
I use Atom, so Atom opens with 'INcorrect commit message' displayed, which I change to 'Correct commit message' and save my changes.
After I saved the altered commit message, I did a $ git log -1
expecting to see 'Correct commit message'; however, I still see 'INcorrect commit message.'
What exactly am I doing wrong?
Note
Just prior to this, I changed my git editor from Sublime to Atom following these instructions: How do I make Git use the editor of my choice for commits?
I basically used:
$ git config --global core.editor "atom"
and
$ export GIT_EDITOR=atom
I realize now that I didn't have to do both, but I also realize this probably didn't hurt either.