git commit
Step 1: Use the --amend option to open an interactive shell for editing commit message.
--amend
git commit --amend
Step 2: In the interactive shell, edit the commit message.