how to change a commit message on git code example Example: git amend last commit message $ git commit --amend -m "New and correct message"