How to undo last commit message in Git

Amend the most recent commit message in Git and push the changes to a remote branch.

Amend the most recent commit message:

git commit --amend -m "New message"

Changes already pushed to remote branch

git push <remote> <branch> -f