Git Bisect
Find bugs with binary search through commits
Git bisect uses binary search to find which commit introduced a bug. It tests O(log n) commits instead of all of them.
Tell Git the last known good commit and the current bad commit.
8 commits, only ~3 tests needed (logâ‚‚8 = 3)
C1
C2
?C3
?C4
?C5
?C6
?C7
?C8
oldernewer
Terminal
$ git bisect start $ git bisect bad # current (C8) is broken $ git bisect good C1 # C1 was working