git comment amend code example Example 1: git amend Click to copygit commit --amend Example 2: git amend Click to copygit commit --amend -m "an updated commit message"