Skip to content

Instantly share code, notes, and snippets.

@jvsidler
Created November 19, 2013 16:38
Show Gist options
  • Save jvsidler/7548312 to your computer and use it in GitHub Desktop.
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'.
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