53
Have you ever used git bisect?
(programming.dev)
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Follow the wormhole through a path of communities !webdev@programming.dev
4-5 times now. When confronted with more than a hundred commits between latest known working version and the one you've observed the bug (which was not catched by any of the unit tests) it can save some time to find the fishy commit.
In such a case I create a testcase on top to reproduce the bug. Then bisect and for each stage add the testcase, build, run tests. FYI: this only works if all (or at least most) of the commits in the chain are compilable - if you've done a big messy refactoring with several commits breaking the build, bisect can get you only so far.