Bird
0
0

Which of the following is the correct syntax to view all stashes in Git?

easy📝 Command Output Q3 of 15
Git - Stashing
Which of the following is the correct syntax to view all stashes in Git?
Agit stash -list
Bgit stash list
Cgit stash --list-all
Dgit stash ls
Step-by-Step Solution
Solution:
  1. Step 1: Recall the correct syntax

    The correct syntax to list stashes is git stash list without any dashes or extra flags.
  2. Step 2: Identify invalid options

    Options with dashes like -list or --list-all and shorthand ls are not valid for this command.
  3. Final Answer:

    git stash list -> Option B
  4. Quick Check:

    Correct syntax for stash list = git stash list [OK]
Quick Trick: Use exact command: git stash list (no dashes) [OK]
Common Mistakes:
  • Adding dashes incorrectly
  • Using shorthand like ls instead of list
  • Confusing with other git commands

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Git Quizzes