I frequently use git stash
and git stash pop
to save and restore changes in my working tree. Yesterday I had some changes in my working tree that I
I liked Aristotle's approach, but didn't like using GITK... as I'm used to using GIT from the command line.
Instead, I took the dangling commits and output the code to a DIFF file for review in my code editor.
git show $( git fsck --no-reflog | awk '/dangling commit/ {print $3}' ) > ~/stash_recovery.diff
Now you can load up the resulting diff/txt file (its in your home folder) into your txt editor and see the actual code and resulting SHA.
Then just use
git stash apply ad38abbf76e26c803b27a6079348192d32f52219