Bird
0
0

What happens to your working directory after you run git stash?

easy📝 Conceptual Q2 of 15
Git - Stashing
What happens to your working directory after you run git stash?
AYour changes are pushed to the remote repository
BYour changes are committed to the current branch
CYour changes are deleted permanently
DYour changes are saved and the working directory is clean
Step-by-Step Solution
Solution:
  1. Step 1: Effect of git stash on working directory

    Running git stash saves your changes and resets your working directory to match the last commit, making it clean.

  2. Step 2: Eliminate incorrect options

    Changes are not committed, deleted, or pushed by stashing.

  3. Final Answer:

    Your changes are saved and the working directory is clean -> Option D
  4. Quick Check:

    Working directory clean after stash = D [OK]
Quick Trick: Stash clears your workspace but keeps changes safe [OK]
Common Mistakes:
  • Thinking stash commits changes
  • Assuming stash deletes changes
  • Believing stash pushes changes

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Git Quizzes