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.

A tip about interactive rebasing
Avoid regular rebasing (adding some other branch’s commits into the history of your branch) and interactive rebasing (changing commit order, commit messages, squashing, etc.) in the same step. When you’re trying to get commits from another branch into your branch, just rebase without any adjustment/interaction. Only rebase interactively against a commit that’s already in your branch’s history (i.e. a fast-forward commit).