O'Reilly logo

Rails 4 Test Prescriptions by Noel Rappin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Git Bisect

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 42Use 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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required