Git Update Commit Message

One of my faults as a professional developer is that my commit messages aren't always as descriptive as they could be. Sometimes I even notice a spelling error in them. Bleh -- that's not cool, man. When I do catch that my last commit message isn't good enough, I find the following git command useful:

The command below rewrites the message for the previous commit. You can omit the -m and message to go into the commit shell instead.

git commit --amend -m "This is the new message"

Do realize, however, that performing this after you've pushed to a remote repo is considered bad as it rewrites history. If you haven't pushed, however, the command above is gold!