Bird
0
0

Given the stash list:

medium📝 Command Output Q13 of 15
Git - Stashing
Given the stash list:
stash@{0}: WIP on feature
stash@{1}: Fix bug
stash@{2}: Update docs

What will be the stash list after running git stash drop stash@{1}?
Astash@{0}: WIP on feature<br>stash@{1}: Fix bug
Bstash@{0}: WIP on feature<br>stash@{1}: Fix bug<br>stash@{2}: Update docs
Cstash@{0}: Fix bug<br>stash@{1}: Update docs
Dstash@{0}: WIP on feature<br>stash@{1}: Update docs
Step-by-Step Solution
Solution:
  1. Step 1: Understand what git stash drop stash@{1} does

    This command removes the stash at index 1, which is 'Fix bug'.
  2. Step 2: Recognize stash reindexing after drop

    After dropping stash@{1}, stash@{2} moves up to stash@{1} position.
  3. Final Answer:

    stash@{0}: WIP on feature
    stash@{1}: Update docs
    -> Option D
  4. Quick Check:

    Drop stash@{1} removes it and shifts others up [OK]
Quick Trick: Dropped stash removed, higher indexes shift down [OK]
Common Mistakes:
  • Not realizing stash indexes shift after drop
  • Assuming stash@{1} remains after drop
  • Confusing stash names with indexes

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Git Quizzes