Git Bisect
Explore how to use Git bisect to identify the exact commit that introduced a bug in your Rails project. Learn how to start bisect mode, mark commits as good or bad, and automate testing with scripts. This lesson helps you troubleshoot complex issues by narrowing down the source of failures efficiently.
We'll cover the following...
Git bisect mode
The git bisect method is the kind of tool we’ll use about once every six months, but when we use it, we’ll be totally thrilled that it exists.
Isolation commits for debugging
The git bisect is indicated when something has gone wrong in our code, and we believe it to be the result of a code change but we cannot isolate which change resulted in the problem. The git bisect's goal is to isolate the commit where the change occurred.
Note: Use
git bisectto track down mysterious failures in our code when we have no idea how they were inserted.
We start using git bisect with two commands:
$ git ...