change commit message

C++
$ git commit --amend -m "New and correct message"
git commit --amend -m "New commit message."git commit --amend -m "New commit message"$ git commit --amend -m "New and correct message"git commit --amend
// press enter, editor would opengit commit --amend -m "New commit message"

Source

Also in C++: