Skills › 💻 Terminal & git

Park unfinished work with git stash

Need to switch branches but you're mid-change? Stash it, switch, and bring it back later.

⏱ 30s

  1. Run git stash to save your uncommitted changes and clean the working tree.
  2. Switch branches and do the urgent thing.
  3. Come back and run git stash pop to restore your changes.
  4. git stash list shows everything you've parked.

Tip: New files aren't stashed unless you add -u.

Try it now: Edit a file in any repo, run git stash, check git status, then git stash pop.

Practice in the feed →

Next crumbs

Sources