To amend a commit message after it has been pushed to remote. ONLY if sure no one else has pulled/pushed from it.

[specify n as number of commits you want to view/amend]

git rebase -i HEAD~n

[need interactive change where change word pick to reword on each file to change]

[save and close and then interactively alter the commit message in the editor. save and close]

[force push to remote]

git push --force

https://www.educative.io/answers/how-to-change-a-git-commit-message-after-a-push