Stashes

Applying, Popping and Dropping Stashes

With the fix committed, Sam discards the README experiment and brings the runner back, then finishes it by deleting the old schema file:

Dropping one stash, popping another, and committing the resultShell
git stash drop stash@{0}
git stash pop
git rm -q db/schema.sql
git add db && git commit -qm "Apply numbered SQL migrations from db/migrations"
Output
Dropped stash@{0} (1c6cfe0012a4413f1f8ff8c82656742f7dbcc92c)
On branch main
...
Dropped refs/stash@{0} (f43823a00fcc6347e4a426b0b458dc07e8a96c58)

pop is apply plus drop: it restored the modified file and the untracked folder (listed in the git status it prints), then deleted the stash. apply restores without deleting. If the changes conflict, pop stops with conflict markers and keeps the stash; resolve, then git stash drop. git stash branch <name> pops a stash onto a new branch started where the stash was made, so it always applies cleanly. The dropped README stash is not quite gone either: git fsck recovers it.