Finding the commit that broke it with git bisect
A bug is live, the previous release was fine, and two hundred commits sit in between.
git bisect start
git bisect bad HEAD
git bisect good v1.4.0
git checks out the midpoint; you test, mark good or bad, and repeat about log2(200) ≈ 8 times. Then git bisect reset.
With a reliable reproduction, automate it:
git bisect run ./test.sh
Exit 0 means good, non-zero means bad.
Two caveats: dependency changes and migrations can leave intermediate commits unrunnable — git bisect skip those. And with many merge commits, --first-parent follows the mainline and saves detours.