How to do it...

To begin bisecting, we simply type the following:

$ git bisect start

To mark the current commit (HEAD -> bug_hunting) as bad, we type the following:

$ git bisect bad

We also want to mark the last known good commit (master) as good:

$ git bisect good master
Bisecting: 11 revisions left to test after this (roughly 4 steps)
[9d2cd13d4574429dd0dcfeeb90c47a2d43a9b6ef] Build map part 11

This time, something happened. Git did a checkout of 9d2cd13, which it wants us to test and mark as either good or bad. It also tells us there are 11 revisions to test after this, and it can be done in approximately four steps. This is how the bisecting algorithm works: every time a commit is marked as good or bad, Git will checkout the one between ...

Get Git Version Control Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.