Git Reference / Stashing
10Stashing
Shelve uncommitted work so you can switch context, then bring it back.
Save & restore
A stack of temporary snapshots.
git stash push -m "wip: navbar" git stash -u # include untracked files git stash list git stash pop # apply + drop git stash apply stash@{1} # apply, keep in list
Advanced stash
Partial stashes and branching from one.
git stash push -p # choose hunks git stash push -- src/api.js # specific paths git stash show -p stash@{0} git stash branch new-branch # branch from stash git stash drop / git stash clear