Bird
0
0

You want to stash changes in src/app.js and src/utils.js but keep changes in README.md. Which command achieves this?

hard📝 Workflow Q8 of 15
Git - Stashing
You want to stash changes in src/app.js and src/utils.js but keep changes in README.md. Which command achieves this?
Agit stash push -- src/app.js src/utils.js
Bgit stash push -a
Cgit stash push -- README.md
Dgit stash push -p
Step-by-Step Solution
Solution:
  1. Step 1: Identify files to stash

    You want to stash only src/app.js and src/utils.js.
  2. Step 2: Choose correct command

    Using git stash push -- src/app.js src/utils.js stashes only those files, leaving README.md changes unstashed.
  3. Final Answer:

    git stash push -- src/app.js src/utils.js -> Option A
  4. Quick Check:

    Use -- with file list to stash specific files = B [OK]
Quick Trick: List files after -- to stash only those files [OK]
Common Mistakes:
  • Using -a which stashes all files
  • Stashing README.md instead of desired files
  • Using -p without specifying files

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Git Quizzes