Git 2 · Committing

Change the last commit message

Replace the message of the most recent commit.

git commit --amend -m "New message"

Caution: This rewrites the commit. Avoid it once the commit has been pushed and shared.

Official Git 2 documentation

More committing commands

All committing commands · Git 2 cheatsheet

Was this page helpful?