Bird
0
0

Which of the following is the correct syntax to drop the second stash in the list?

easy📝 Syntax Q3 of 15
Git - Stashing
Which of the following is the correct syntax to drop the second stash in the list?
Agit stash drop stash@{1}
Bgit stash drop 1
Cgit stash remove stash@{2}
Dgit stash clear stash@{1}
Step-by-Step Solution
Solution:
  1. Step 1: Identify correct stash index syntax

    Stashes are referenced as stash@{index}, so the second stash is stash@{1}.
  2. Step 2: Use correct command

    git stash drop stash@{1} correctly drops the second stash.
  3. Final Answer:

    git stash drop stash@{1} -> Option A
  4. Quick Check:

    Drop second stash = D [OK]
Quick Trick: Use stash@{index} to specify stash for drop [OK]
Common Mistakes:
  • Using numeric index without stash@{}
  • Using wrong commands like remove or clear with stash index

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Git Quizzes