how to change commits in git code example Example: git amend git commit --amend -m "an updated commit message"