Skip to content

Instantly share code, notes, and snippets.

@tibovanheule
Created May 15, 2019 21:32
Show Gist options
  • Save tibovanheule/e2f0a5d96960d4b2cfd9cb33d749d6b9 to your computer and use it in GitHub Desktop.
Save tibovanheule/e2f0a5d96960d4b2cfd9cb33d749d6b9 to your computer and use it in GitHub Desktop.
Recover lost git stashes
git fsck --unreachable | grep commit | cut -d ' ' -f3 | xargs git log --merges --no-walk
git update-ref refs/stash 4b3fc45c94caadcc87d783064624585c194f4be8 -m "My recover stash"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment