Bird
0
0

After running git stash push -- file1.txt file2.txt, you see no stash created. What could be wrong?

medium📝 Troubleshoot Q7 of 15
Git - Stashing
After running git stash push -- file1.txt file2.txt, you see no stash created. What could be wrong?
ACommand syntax is invalid
BYou must add files before stashing
CNo changes in file1.txt or file2.txt to stash
DStash only works on staged files
Step-by-Step Solution
Solution:
  1. Step 1: Check if files have changes

    If file1.txt and file2.txt have no changes, stash will not create an entry.
  2. Step 2: Understand stash behavior

    Stash saves changes in working directory or index; if none, no stash is created.
  3. Final Answer:

    No changes in file1.txt or file2.txt to stash -> Option C
  4. Quick Check:

    No changes in specified files means no stash created = C [OK]
Quick Trick: Stash only saves actual changes in specified files [OK]
Common Mistakes:
  • Assuming stash requires files to be staged
  • Thinking command syntax is wrong
  • Believing stash always creates an entry

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Git Quizzes