The other day, I wrote about Guowei Lv’s two very nice tutorials on using Magit rebase. Now Lv has another tutorial out on using Magit bisect. When you’re trying to track down which commit introduced an error, the Git bisect function can greatly reduce your work ( versus ). I’ve used it from the command line a few times and it really helped.
I’ve never used it from Magit because I wasn’t sure how to do it and in the heat of the moment, it just seemed easier to use the command line. Lv shows, that was just silly. As usual, Magit makes using Git easier and you can do it right from Emacs.
Lv’s tutorial looks at a toy bug and first runs through the bisect process from within Magit manually. That’s pretty nice but of course you can automate the process further if you can test the commits with a script. Lv reruns the bisect process using a script for testing the commits and the process is almost completely automatic.
As with rebasing, bisecting might be something you don’t use that often. If that’s the case, it probably makes sense to bookmark Lv’s tutorial so you can refresh your memory as needed.