31 / 57 · 17 Git & Version Control · Bisect and Cherry-Pick← prev⊞ allnext →☰ Read as one page
5.1Git Bisect: Finding Regressions with Binary Search
When a test that used to pass is now failing, git bisect performs a binary search through commit history to find exactly which commit introduced the regression. Instead of manually checking dozens of commits, bisect finds the answer in log2(n) steps. For 1000 commits, that is about 10 steps.