Predict Stash List
Predict Output Medium
Question
After running `git stash`, what does `git stash list` show?
Code
echo "change" >> file.txt
git stash
git stash list
Hint
The stash is stored in a stack, indexed from 0.
Explanation
git stash list shows all stashed changes. After one stash, it shows one entry: stash@{0}: WIP on <branch>: <hash> <message>. The {0} is the stash index (most recent is 0). If you stash again, the new one becomes {0} and the old one shifts to {1}.
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.