If you want to edit more than one commit message, run:
git rebase -i HEAD~commit_count
commit_count with number of commits that you want to edit.
This command launches your editor. Mark the first commit (the one that you want to change) as “edit” instead of “pick”, then save and exit your editor. Make the change you want to commit and then run