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