git change message of specific commit code example
Example 1: change git commit message
git commit --amend -m "New commit message"
Example 2: change message from last pushed commit
git commit --amend
Example 3: change commit message
git commit --amend
// press enter, editor would open
Example 4: change commit message after push
git push --force <repository> <branch>
Example 5: how to change a commit message
git commit --amend
git push --force-with-lease <repository> <branch>