Skip to content

FAQ

Frequent questions about stash: what it excludes, how to recover dropped stashes, and when to use worktrees instead.

What does stash exclude?

Untracked files by default. Use -u to include them, -a for ignored files too.

Can I recover a dropped stash?

Yes, with git fsck --no-reflog | awk '/dangling commit/ {print $3}' then git stash apply <hash>, but only if gc has not run.

Stash vs commit?

Stash is temporary and local; commit is permanent and shareable. Use stash for context switches, commit for history.

Stash vs worktree?

Stash shelves changes; worktree gives a second working directory. Use worktrees for hours-long parallel work, stash for minutes-long switches.