rename commit in remote and local code example
Example: how to change a commit message after push
git commit --amend -m "New commit message"
Then
git push --force
and you're done
git commit --amend -m "New commit message"
Then
git push --force
and you're done