git bisect is the kind of tool you will use about once every six months, but when you use it, you will be totally thrilled that it exists.
git bisect is indicated when something has gone wrong in your code, and you believe it to be the result of a code change but you cannot isolate which change resulted in the problem. git bisect’s goal is to isolate the commit where the change occurred.
|Prescription 42||Use git bisect to track down mysterious failures in your code when you have no idea how they were inserted.|
You start using git bisect with two commands:
$ git bisect start
$ git bisect bad
The first command puts Git into what we’ll call bisect mode, and the second command says that the current Git snapshot is bad, meaning it contains ...