Keep calm and Git bisect

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.

Keep calm and Git bisect →Git Bisect Run documentation →

Published by Bramus!

Bramus is a frontend web developer from Belgium, working as a Chrome Developer Relations Engineer at Google. From the moment he discovered view-source at the age of 14 (way back in 1997), he fell in love with the web and has been tinkering with it ever since (more …)

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.