Bird
0
0

Which command correctly saves your current changes with a custom message in git stash?

easy📝 Conceptual Q2 of 15
Git - Stashing
Which command correctly saves your current changes with a custom message in git stash?
Agit stash save -m "My changes"
Bgit stash commit -m "My changes"
Cgit stash push -m "My changes"
Dgit stash add -m "My changes"
Step-by-Step Solution
Solution:
  1. Step 1: Identify correct syntax for message option

    The modern and recommended command to stash with a message is git stash push -m "message".
  2. Step 2: Check other options

    git stash save is deprecated, and commit or add are invalid for stash.
  3. Final Answer:

    git stash push -m "My changes" -> Option C
  4. Quick Check:

    Use git stash push -m for messages = C [OK]
Quick Trick: Use 'git stash push -m' to add a message [OK]
Common Mistakes:
  • Using deprecated 'git stash save'
  • Trying to commit stash changes
  • Using 'git stash add' which does not exist

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Git Quizzes