Challenge - 5 Problems
Git Stash Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate2:00remaining
What is the output of
git stash list after creating two stashes?You have created two stashes in your git repository using
git stash twice. What will git stash list show?Git
git stash listAttempts:
2 left
💡 Hint
Remember that the most recent stash is listed as stash@{0}.
✗ Incorrect
The git stash list command shows all stashes with the most recent stash at the top as stash@{0}. Older stashes have increasing numbers.
🧠 Conceptual
intermediate1:30remaining
What does
git stash list show?Choose the best description of what
git stash list displays.Attempts:
2 left
💡 Hint
Think about what you save when you stash changes.
✗ Incorrect
git stash list shows all the saved stashes with their identifiers and messages describing the changes saved.
❓ Troubleshoot
advanced2:00remaining
Why does
git stash list show no output after stashing changes?You ran
git stash to save changes, but git stash list shows nothing. What could be the reason?Attempts:
2 left
💡 Hint
Think about what happens if you stash without any changes.
✗ Incorrect
If there are no changes to stash, git stash does not save anything, so git stash list remains empty.
🔀 Workflow
advanced1:30remaining
How to view details of a specific stash from
git stash list?After running
git stash list, you want to see the detailed changes saved in stash@{1}. Which command do you use?Attempts:
2 left
💡 Hint
You want to see the patch details without applying the stash.
✗ Incorrect
git stash show -p stash@{1} shows the detailed patch of the specified stash without applying it.
✅ Best Practice
expert2:00remaining
What is the best practice to keep your stash list manageable?
You have many stashes saved and want to keep your stash list clean. What is the best practice?
Attempts:
2 left
💡 Hint
Think about managing clutter and keeping only useful stashes.
✗ Incorrect
Regularly applying or dropping unneeded stashes keeps the stash list manageable and avoids confusion.