Back to lessons
Stashing Changes
Temporarily save work-in-progress without committing.
Step 1 of 714%
Stashing lets you save uncommitted changes and restore them later. Perfect for switching branches without losing work.
Stashing is like hitting pause on your work. Imagine you're in the middle of a feature when an urgent bug needs fixing — you don't want to commit half-baked code, but you can't switch branches with uncommitted changes. Running git stash tucks everything away, gives you a clean working directory, and lets you come back to it later with git stash pop.
1 / 7