git change commit message online code example Example: fix typo in commit message git commit --amend -m "New commit message"