You also can use git filter-branch
for that.
git filter-branch -f --msg-filter "sed 's/errror/error/'" $flawed_commit..HEAD
It's not as easy as a trivial git commit --amend
, but it's especially useful, if you already have some merges after your erroneous commit message.
Note that this will try to rewrite every commit between HEAD
and the flawed commit, so you should choose your msg-filter
command very wisely ;-)