Bird
0
0

You want to restore stashed changes but keep the stash for later use. Which command should you use instead of git stash pop?

hard📝 Application Q9 of 15
Git - Stashing
You want to restore stashed changes but keep the stash for later use. Which command should you use instead of git stash pop?
Agit stash apply
Bgit stash pop --keep
Cgit stash restore
Dgit stash save
Step-by-Step Solution
Solution:
  1. Step 1: Understand difference between pop and apply

    git stash pop restores and removes stash; git stash apply restores but keeps stash.
  2. Step 2: Check invalid options

    --keep and restore are not valid commands or options; save creates stash.
  3. Final Answer:

    git stash apply -> Option A
  4. Quick Check:

    Apply restores stash without deleting it [OK]
Quick Trick: Use apply to restore stash but keep it [OK]
Common Mistakes:
  • Thinking pop can keep stash with --keep
  • Using non-existent restore command
  • Confusing save with restore

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Git Quizzes