Skip to content

Stash Quick Recipe — docs/recipes/stash-quick.md

# Stash all tracked + untracked files
git stash -u

# Stash only specific paths (leave others intact)
git stash push -- src/app.js tests/unit/

# Create branch from a stash (ideal after interruption)
git stash branch hotfix-stash main

# Apply without deleting (re-use on multiple branches)
git stash apply stash@{2}

# Preserve index (staging area) through pop
git stash --keep-index && later: git stash pop

# Drop all stashes (danger — only after confirming none needed)
git stash clear