- Howtos
- Common git challenges
- Change your commit message for the most recent commit
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:
Bash prompt
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:
Bash prompt
git commit --amend -m "This is my improved commit message"