Bird
0
0

What will be the result of running git stash clear on a repository with 3 stashes?

medium📝 Command Output Q5 of 15
Git - Stashing
What will be the result of running git stash clear on a repository with 3 stashes?
AOnly the most recent stash will be removed.
BThe stashes will be saved to a backup file.
CThe command will fail with an error.
DAll 3 stashes will be removed, leaving an empty stash list.
Step-by-Step Solution
Solution:
  1. Step 1: Understand git stash clear behavior

    git stash clear deletes all stashes in the repository.
  2. Step 2: Apply to 3 stashes

    All 3 stashes will be removed, leaving no stashes behind.
  3. Final Answer:

    All 3 stashes will be removed, leaving an empty stash list. -> Option D
  4. Quick Check:

    Clear removes all stashes = B [OK]
Quick Trick: Clear empties stash list completely [OK]
Common Mistakes:
  • Thinking clear removes only one stash
  • Expecting backup or error on clear

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Git Quizzes