Accidentally Dropped Your Git Stash? Here’s How to Get It Back in 2 Minutes
Step 1: Find the Dropped Stash
Run:
git fsck --no-reflogs | grep commit
Example output:
dangling commit 738c25ced505b1cd58a64acce22a047d05681811
This dangling commit is your dropped stash.
Step 2: Inspect the Stash Contents
git show --name-only 738c25ced505b1cd58a64acce22a047d05681811
This lists the files stored in that stash.
Step 3: Switch to the Target Branch
git switch your-branch-name
Step 4: Restore the Stash
git stash apply 738c25ced505b1cd58a64acce22a047d05681811
Verify the recovery:
git status
Your files should now be restored.
Example
Lost files
- 7 modified files
- 8 new untracked files
Recovery steps
# Find the dropped stash
git fsck --no-reflogs | grep commit
dangling commit 738c25ced505b1cd58a64acce22a047d05681811
# Inspect stash contents
git show --name-only 738c25ced505b1cd58a64acce22a047d05681811
# Switch branch
git switch feat/super-page
# Recover files
git stash apply 738c25ced505b1cd58a64acce22a047d05681811
Result: All files restored successfully.
Why This Works
git stash drop removes the reference to the stash but does not immediately delete the underlying data.
Git keeps it as a dangling object in the repository for roughly 30 days, allowing recovery.
Prevention Tips
Use aliases
git config --global alias.sp "stash pop"
git config --global alias.sd "stash drop"
Check stashes before applying
git stash list
git stash show
Add descriptive stash messages
git stash -u -m "dashboard work in progress"
Multiple Dropped Stashes
If git fsck returns multiple dangling commits:
git show --name-only <commit-hash>
Identify the correct one and apply it.
Summary
- Dropped stash does not mean lost data
- Git retains the data for ~30 days
- Recovery requires only four commands
Keep Reading

Shubham
Full Stack Developer
