Recovery
Recover a lost stash
When stash entries seem to disappear, determine whether they were popped, dropped, or detached from refs, then recover via reflog or dangling commits.
- Anyone actively handling a Git mistake
- Readers who want a conservative rescue habit before trouble happens
- Stop mutating the repo further
- Be ready to inspect `git reflog`, `git status`, and `git log --graph`
- Running more reset or rebase commands before preserving a checkpoint
- Changing shared history before assessing blast radius
A “missing stash” is often a missing reference, not immediate data destruction.
Identify the loss type first
- stash was popped and no longer listed
- stash was dropped or cleared
- stash commit still exists but ref moved
Stash history
HEAD@{3}HEAD@{2}HEAD@{1}Current
Recovery action
rescue/recover
First checks
git stash list
git reflog show stash
git reflog
If stash reflog exists, recover from there first.
If stash list is empty
Search dangling objects and inspect candidates:
git fsck --no-reflog | rg dangling
git show <commit>
When you find the target, preserve it immediately:
git switch -c rescue/stash-recovery <commit>
Recovery options
- restore patch only:
git show <commit> > rescue.patch - restore working changes: apply stash ref or cherry-pick from rescue branch
Repeated apply/pop attempts on your active branch can worsen state confusion. Preserve evidence first.
Good follow-up reads
reflog recoveryrecover after resetgit-stash