• @zweieuro
    link
    13
    edit-2
    2 months ago
    Git bisect
    

    Is goddamn amazing! I had a very large multi-branch project that somewhere somehow had some crashing bug. Instead of searching through 5 or so branches with 20 something large commits for each, I bisected like 7 times and it told me exactly where to bug was introduced.

    Highly recommended

    • @[email protected]OP
      link
      fedilink
      English
      82 months ago

      Highly recommended

      I agree. Once we get a hang of the value that bisect brings, one unintended consequence is that we start to value atomic commits a whole lot more. There is nothing more annoying than bisecting a bug and suddenly stumbling upon a commit that does it all: updates dependencies, touches everything under the sun, does cleanup commits for unrelated files, etc. Yuck.

      • @zweieuro
        link
        22 months ago

        Exactly! My case was such a case actually. But it further shows that bisect is a great tool that benefits from good practice.

    • @[email protected]
      link
      fedilink
      52 months ago

      I love git bisect for complex regressions! If I don’t immediately know where a bug is, I write a regression test and then bisect to find where it was introduced. Knowing exactly where the bug was introduced and being able to look at the diff almost always speeds up finding the bug.

      • @[email protected]
        link
        fedilink
        52 months ago

        For those who don’t know (I assume you do), you can git bisect run some_command and git will automatically run git bisect until it finds the falty commit. It’s amazing.