Bird
0
0

You have two stashes saved: stash@{0} and stash@{1}. You want to restore stash@{1} but keep stash@{1} intact. Which command should you use?

hard📝 Workflow Q15 of 15
Git - Stashing
You have two stashes saved: stash@{0} and stash@{1}. You want to restore stash@{1} but keep stash@{1} intact. Which command should you use?
Agit stash apply stash@{1}
Bgit stash pop stash@{0}
Cgit stash pop stash@{1}
Dgit stash drop stash@{1}
Step-by-Step Solution
Solution:
  1. Step 1: Understand difference between pop and apply

    git stash pop restores and removes the stash entry; git stash apply restores but keeps the stash.
  2. Step 2: Choose command to restore stash@{1} without removing it

    Use git stash apply stash@{1} to restore changes but keep stash@{1} in the list.
  3. Final Answer:

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

    Apply restores stash without deleting it [OK]
Quick Trick: Use apply to restore stash without deleting it [OK]
Common Mistakes:
  • Using pop which deletes the stash
  • Dropping stash instead of restoring
  • Applying wrong stash reference

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Git Quizzes