4 ms·
My favorite part of `git bisect` is `run`: give it a script that'll exit with 0 for a good commit and non-0 for a bad commit, and it'll do it all for you! Pers
by alxndr 13y ago
My favorite part of `git bisect` is `run`: give it a script that'll exit with 0 for a good commit and non-0 for a bad commit, and it'll do it all for you!
Personal gripe: I always, always, forget to `git bisect reset`.
- GhotiFish 13y agoI did not know about that. Article from lwn: http://lwn.net/Articles/317154/ http://lwn.net/Articles/317154/ thanks for the tip!
- sstarr 13y agoA friend blew my mind with this a while ago when I was trying to track down a commit which broke something. This short guide he wrote gives step by step instructions for using it with your tests: https://gist.github.com/jordelver/5998870 https://gist.github.com/jordelver/5998870
- lucaspiller 13y agoSolution: Automate it https://github.com/grosser/git-autobisect https://github.com/grosser/git-autobisect
- alxndr 13y agoHm, how does it decide how far back to start?
- lucaspiller 13y agoIt defaults to looking through the last 1000 commits, as it's automatic it doesn't really matter if it isn't optimal.
- alxndr 13y agoJust means you might be grabbing more coffee than you were expecting, especially if your test takes some time.
- mark_h 13y agopatio11 has a great story about how he learned of it, via Patrick Collison: http://www.kalzumeus.com/2012/08/06/stripe-and-ab-testing-made-me-a-small-fortune/ http://www.kalzumeus.com/2012/08/06/stripe-and-ab-testing-ma...
- alxndr 13y agoWow, kudos to Patrick.