amend previous commit comment code example Example: git amend with previous commit git commit --amend -m "an updated commit message"