Create and list stashes

Stash tracked changes

git stash

Example:

git stash push -m "wip: login form"

List stashes

git stash list

Example:

git stash show stash@{0}

Apply or pop stash

Apply stash and keep entry

git stash apply stash@{0}

Example:

git stash apply

Pop stash and remove entry

git stash pop

Example:

git stash pop stash@{1}

Advanced stash usage

Include untracked files

git stash -u

Example:

git stash -a

Stash specific paths

git stash push src/auth.js

Example:

git stash branch fix-login stash@{0}

Common mistakes / Pitfalls

  • Stash pop can fail with conflicts; always check git status after pop.
  • Stashes are local only and can be lost if repository is deleted.
  • For long-lived work, create a branch instead of stacking many stashes.
Last updated: February 2026