Bird
0
0

Given this sequence of commands:

medium📝 Command Output Q13 of 15
Git - Stashing
Given this sequence of commands:
git stash save "work in progress"
git stash apply
What happens to the stash list after these commands?
AThe stash list still contains the saved stash.
BThe stash list is empty.
CThe stash list contains two identical stashes.
DThe stash list is deleted.
Step-by-Step Solution
Solution:
  1. Step 1: Save a stash

    git stash save "work in progress" creates a stash entry and saves changes.
  2. Step 2: Apply stash without removing

    git stash apply restores changes but keeps the stash entry intact.
  3. Final Answer:

    The stash list still contains the saved stash. -> Option A
  4. Quick Check:

    Apply keeps stash in list [OK]
Quick Trick: Apply restores but stash remains in list [OK]
Common Mistakes:
  • Assuming apply removes stash
  • Thinking stash list duplicates
  • Believing stash list clears automatically
  • Confusing apply with pop

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Git Quizzes