Bird
0
0

Which of the following is the correct syntax to stash only -index.html and style.css files?

easy📝 Syntax Q12 of 15
Git - Stashing
Which of the following is the correct syntax to stash only -index.html and style.css files?
Agit stash push -- -index.html style.css
Bgit stash push -- files -index.html style.css
Cgit stash push -index.html style.css
Dgit stash push -f -index.html style.css
Step-by-Step Solution
Solution:
  1. Step 1: Recall the syntax for stashing specific files

    The correct syntax uses git stash push -- <files> to specify files.
  2. Step 2: Identify the correct option

    git stash push -- -index.html style.css uses -- before file names, which is required to separate options from file paths.
  3. Final Answer:

    git stash push -- -index.html style.css -> Option A
  4. Quick Check:

    Use -- before files to stash specific files [OK]
Quick Trick: Always use -- before file names in stash command [OK]
Common Mistakes:
  • Omitting -- before file names
  • Using unsupported flags like -f
  • Adding extra words like 'files'

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Git Quizzes