Predict Stash Pop
Predict Output Medium
Question
You stashed changes, then ran `git stash pop`. What happens to your working directory?
Code
git stash
git stash pop
Hint
Pop restores and removes the stash in one step.
Explanation
git stash pop applies the most recent stash (stash@{0}) to your working directory and removes it from the stash list. It is equivalent to git stash apply + git stash drop. If applying the stash causes conflicts, the stash is NOT dropped and you must resolve the conflicts manually.
Related Resources
Related Lessons
Related Cheatsheets
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.