Created
November 19, 2013 16:38
-
-
Save jvsidler/7548312 to your computer and use it in GitHub Desktop.
Handy one liner to recover contents of unintentionally cleared stashes. Recover work after 'git stash clear'.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git fsck --unreachable | grep commit | cut -d\ -f3 | xargs git show | |
git stash apply <commit sha-1> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment