How to reword any git commit message
Use git rebase -i (interactive rebase) to change any commit message. You can pass the commit identifier of any
commit (preferably in your current commit’s history) to it as the first parameter. Once you’ve got the
interactive rebase list of commits up, you can place an “r” for “Reword” in front of the commit you’d like to reword.
When you save and close the list of commits, you’ll be prompted in the editor of your choice with the commit
message for you to edit.
Keep in mind that changing the commit message for a commit changes its commit id (it is technically then a different commit). So you’ll need to force push or use other techniques to get the commit message changed on the remote. If you haven’t yet pushed the commit you reworded you don’t need to do anything special.