to read, 1.56K views since 2016.12.16

How to change commit message in git

Sometime in a hurry you can make a mistake in commit's message and need to change it before pushing to remote. There's a possiiblity to change last's commit message before you push it to remote repository.

This can be done by --amend option of commit command:

git commit --amend -m "new message to your commit"

Voila

Your last commit has new commit message, you can check it out by typing

git log