One minute
Recover Lost Git Commit Message
How to quickly recover an unsaved or lost Git commit message from the local .git/COMMIT_EDITMSG file.
Sometimes happens that you lose the message added using git commit -a command so you use the editor to set for example a commit message and a longer description.
This might happen when for example you fail signing the commit.
A very easy solution is recovering the following file content:
cat .git/COMMIT_EDITMSG