Hacker News new | past | comments | ask | show | jobs | submit login

"had to" is a stretch, but as the first example from GitHub: https://github.com/ankidroid/Anki-Android/issues/7781

There's a lot of value in bisecting to find the exact commit, moving from "this is probably the commit that broke it" to "this is exactly the commit which broke it"

Typical workflow:

* branch off master

* Write a test which passes at some point in the past, and fails on HEAD

* rebase the test into the branch at the point in the past, so bisect works

* git bisect to pinpoint the bug

With a non-squashed and a history where each commit builds, `git bisect` points to the exact failing commit and makes the investigation trivial

An additional advantage is that you're not wasting time investigating: the unit test can be used as a regression test




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: