Question: You find a bug in your project, but can't locate where it was introduced in the commit history. How would you diagnose this problem?

  1. Manually backtrack through your commit history.
  2. Use git search -diff to compare all commits in your repository history.
  3. Run a git rebase to find the buggy commit.
  4. Use git bisect to compare the buggy commit to an early commit that works as expected.

Answer: The correct answer of the above question is Option D:Use git bisect to compare the buggy commit to an early commit that works as expected.