Recovering from lost git commit messages
March 31, 2014 Leave a comment
I posted a question and answer to stack overflow that explains how to undo the dangerous -c flag in git.
If ever you accidentially overwrite a commit message using git commit –amend, you can easily undo it by search the .git/logs directory. There will still be a hash that points to the previous object which will contain the original message.