Question: What is the difference between git stash pop and git stash apply?

  1. git stash pop pushes the topmost commit to the current branch, while git stash apply caches the last commit in the current branch.
  2. git stash pop applies the topmost entry in the stash to the working files and removes it from the stash, while git stash apply applies the topmost entry in the stash to the working files but leaves it in the stash.
  3. git stash pop merges the topmost commit to the current branch, while git stash apply merges the last commit in the current branch.
  4. git stash pop applies the topmost entry in the stash to the working files but leaves it in the stash, while git stash apply applies the topmost entry in the stash to the working files and removes it from the stash.

Answer: The correct answer of the above question is Option B:git stash pop applies the topmost entry in the stash to the working files and removes it from the stash, while git stash apply applies the topmost entry in the stash to the working files but leaves it in the stash.