Amend
You have a couple of options here. You can do
git commit --amend
as long as it's your last commit.
Interactive rebase
Otherwise, if it's not your last commit, you can do an interactive rebase,
git rebase -i [branched_from] [hash before commit]
Then inside the interactive rebase you simply add edit to that commit. When it comes up, do a git commit --amend
and modify the commit message. If you want to roll back before that commit point, you could also use git reflog
and just delete that commit. Then you just do a git commit
again.