Question: While modifying a file, you're unexpectedly assigned an urgent bug fix on another branch. How can you temporarily save your local work without committing?

  1. This is not possible, as you cannot save locally without committing.
  2. Run git hold to save a local copy of what you're doing to return to later.
  3. Save your work with git local-cache.
  4. Use git stash to save your work and come back later and reapply the stashed commit.

Answer: The correct answer of the above question is Option D:Use git stash to save your work and come back later and reapply the stashed commit.