Skip to main content

Change your commit message for the most recent commit

If you've made a typo or have another reason why you'd like to change the most recent commit message, you run this command:

git commit --amend

If you run it like this, it will spin up your predefined editor. To specify the updated commit message on the command line, run:

git commit --amend -m "This is my improved commit message"