Gitflow
🪂Recover a Dropped StashHard+700 XP
Workshop
Scenario reference

Recover a Dropped Stash: the situation, step by step

The situation

You ran `git stash drop` thinking it was an old one. It was today's WIP. Stashes don't show in reflog, but the objects still exist.

`git fsck --unreachable` lists dangling commits. Find the stash, apply by hash.

Hard · 3 steps · +700 XP

What you will practice

This scenario walks through 3 steps, in order:

  1. 01List dangling objects
  2. 02Inspect the candidate commit
  3. 03Apply the dangling stash by SHA
Reveal the step-by-step commands

Try the terminal first — you learn more by doing. When you want to check yourself, here is the command for each step.

  1. 1. List dangling objects
    git fsck --unreachable --no-reflogs
  2. 2. Inspect the candidate commit
    git show abc1234
  3. 3. Apply the dangling stash by SHA
    git stash apply abc1234

Key takeaway

Dropped stashes live as dangling commits until gc. fsck finds them.