git check last commit message code example Example: how to fix the last commit message git commit --amend -m "New commit message."