Bird
0
0

Given the following commands run in sequence:

medium📝 Command Output Q13 of 15
Git - Stashing
Given the following commands run in sequence:
git stash push -m "work in progress"
git stash list
git stash apply

What will be the output of git stash list?
ANo stash entries found.
Bstash@{0}: On main: work in progress
CError: stash not found
Dstash@{1}: On main: work in progress
Step-by-Step Solution
Solution:
  1. Step 1: Understand the effect of git stash push -m "work in progress"

    This command saves current changes with the message "work in progress" as the latest stash entry.
  2. Step 2: Check git stash list output

    Since this is the first stash, it appears as stash@{0}: On main: work in progress.
  3. Final Answer:

    stash@{0}: On main: work in progress -> Option B
  4. Quick Check:

    First stash is stash@{0} with message [OK]
Quick Trick: First stash is always stash@{0} in the list [OK]
Common Mistakes:
  • Expecting no stash entries after push
  • Confusing stash@{0} with stash@{1}
  • Assuming apply removes stash entry

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Git Quizzes