You commit with a typo. Instead of git commit --amend -m "new message" , use:
A detailed explanation of the why behind the change, wrapped at 72 characters. COMMIT-EDITMSG
cat .git/COMMIT_EDITMSG
This is transformative. While writing your commit message, you can scroll down and see exactly what code you are about to lock into history. You no longer need to switch back to a separate terminal tab to run git diff --cached . You commit with a typo
Create a .gitmessage file in your root directory: COMMIT-EDITMSG
: If you forget to include a message using -m , Git forces this file open to ensure you don't leave an empty (and therefore invalid) commit message.
git commit -F .git/COMMIT_EDITMSG