Question: In a situation where you have several commits for a single task, what is the most efficient way to restructure your commit history?

  1. Cherry pick the related commits to another branch.
  2. Delete the task commits and recommit with a new message.
  3. Squash the related commits together into a single coherent commit.
  4. Stash the related commits under a new hash.

Answer: The correct answer of the above question is Option C:Squash the related commits together into a single coherent commit.