Bird
0
0

What is the main purpose of git stash in Git?

easy📝 Conceptual Q11 of 15
Git - Stashing
What is the main purpose of git stash in Git?
ATo merge two branches automatically
BTo permanently delete untracked files
CTo save your current changes temporarily without committing
DTo create a new branch from the current one
Step-by-Step Solution
Solution:
  1. Step 1: Understand what git stash does

    git stash saves your current working changes temporarily without committing them to the branch.
  2. Step 2: Compare with other options

    The other options describe different Git commands or actions unrelated to stashing.
  3. Final Answer:

    To save your current changes temporarily without committing -> Option C
  4. Quick Check:

    Stashing = Temporary save without commit [OK]
Quick Trick: Stash = save work now, come back later [OK]
Common Mistakes:
  • Thinking stash commits changes permanently
  • Confusing stash with branch creation
  • Assuming stash deletes files

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Git Quizzes