Bird
0
0

You tried git stash push -m "update" --include-untracked but ignored files were not saved. Why?

medium📝 Troubleshoot Q7 of 15
Git - Stashing
You tried git stash push -m "update" --include-untracked but ignored files were not saved. Why?
AThe option is misspelled; correct is --include-untracked
BYou must use --all instead of --include-untracked
CUntracked files are never stashed
DYou need to add untracked files before stashing
Step-by-Step Solution
Solution:
  1. Step 1: Check correct option for ignored files

    The correct flag to stash ignored files is --all, not --include-untracked.
  2. Step 2: Effect of wrong option

    Using an invalid option causes ignored files to be ignored during stash.
  3. Final Answer:

    You must use --all instead of --include-untracked -> Option B
  4. Quick Check:

    Use --all to stash ignored files = C [OK]
Quick Trick: Use --all to stash ignored files, not --include-untracked [OK]
Common Mistakes:
  • Using --include-untracked which excludes ignored files
  • Thinking untracked files are stashed by default
  • Believing you must add untracked files before stash

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Git Quizzes