Stashing lets you pause work and switch context without committing.

  1. Save a stash
  • git stash push -m “WIP: experiment” # or: git stash
  • git stash push -u # include untracked
  1. List and inspect
  • git stash list
  • git stash show -p stash@0
  1. Apply or pop
  • git stash apply stash@0
  • git stash pop # apply then drop
  1. Drop or clear
  • git stash drop stash@0
  • git stash clear

Checklist

  • You can create and list stashes
  • You can apply or pop a stash
  • You understand drop vs clear