how to edit old commit message in git

C++
# Displays a list of the last 3 commits on the current branch
$ git rebase -i HEAD~3
Source

Also in C++: