Bird
0
0

After executing the following commands:

medium📝 Command Output Q5 of 15
Git - Stashing
After executing the following commands:
git stash push -m "feature update"
git stash apply

What will git stash list display?
AAn error message indicating no stashes found
BThe stash list will be empty
CThe stash entry "feature update" is removed and replaced by a new stash
DThe stash entry "feature update" remains in the list
Step-by-Step Solution
Solution:
  1. Step 1: Understand git stash push

    This command saves changes to a new stash entry named "feature update".
  2. Step 2: Understand git stash apply

    This applies the latest stash changes but does NOT remove the stash entry from the list.
  3. Final Answer:

    The stash entry "feature update" remains in the list -> Option D
  4. Quick Check:

    Applying stash keeps it intact [OK]
Quick Trick: git stash apply keeps stash, pop removes it [OK]
Common Mistakes:
  • Assuming apply removes the stash entry
  • Confusing stash push with stash save
  • Believing stash list clears automatically after apply

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Git Quizzes