git rename the last commit code example
Example 1: change message from last pushed commit
git commit --amend
Example 2: change last commit message
git commit --amend -m "New commit message."
git commit --amend
git commit --amend -m "New commit message."