I just switched to sublime merge away from github desktop (what an improvement), however I just performed the menu option Edit commit\drop selected commits thinking it was the equivalent of the undo commit button in github desktop.
That has not undone the commit I had selected (which was the most recent in the tree) as I thought, it has dropped (erased) it completely.
I know there are many posts discussing the reflog and of course I'll study that but would love a direct (command line if necessary) solution which fixes this exact problem first, then I can learn more later.
Assume the "drop last commit" actually did something like
git reset --hard HEAD~, you may have amsome chance retrieving the dropped commit viaORIG_HEAD. That says, try giving this command a try and check your luck:If you can recall the commit message, applying
git logon every output ofgit fsck --danglingwill 100% find that commit out for you, provided you haven't done agit gc.