Ever saw your code break and don’t know when exactly the bug was introduced? Zvonimir Spajic walks us through
git bisect to find the commit that broke things.
I’ve used it myself quite a few times by now and it truly is really helpful in those situations. What I didn’t know however, is that it’s possible to have
git bisect find the culprit automagically, by adding a checker-script using
git bisect run <script> [<script args>].
If you are lucky and can write a script to check it for you then becomes fully automated.
The script needs to be outside of source control and return exit code 0 if the commit is considered good or 1 if it’s considered bad.