Bird
0
0

Which command correctly restores the latest stash and removes it from the stash list?

easy📝 Conceptual Q2 of 15
Git - Stashing
Which command correctly restores the latest stash and removes it from the stash list?
Agit stash apply
Bgit stash drop
Cgit stash pop
Dgit stash list
Step-by-Step Solution
Solution:
  1. Step 1: Identify commands that restore stash

    git stash apply restores but keeps stash; git stash pop restores and removes stash.
  2. Step 2: Confirm removal from stash list

    Only git stash pop removes the stash after restoring.
  3. Final Answer:

    git stash pop -> Option C
  4. Quick Check:

    Restore and remove = git stash pop [OK]
Quick Trick: Pop = apply + remove stash [OK]
Common Mistakes:
  • Using apply and expecting stash removal
  • Confusing drop with restore
  • Thinking list restores changes

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Git Quizzes