4 ms·
The git's guide to git: Bisect
- hellbanner 11y agoBisect has saved us many times. Learn it, master it!
- girvo 11y agoBisect is by far the the most useful feature of git aside from "git commit", in my opinion. It's my first port of call when tracking down complex bugs, and it is amazingly useful in that case. Interestingly, overuse of "git rebase" and squashing commits can lower the effectiveness of a bisect. Does anyone know how to avoid that, aside from "don't squash all your commits then"?
- RKoutnik 11y agoThe key here is to ensure each commit has a single purpose. Fix a bug, add a feature, refactor, etc. Rebase is fantastic for taking multiple commits that together have a single purpose and squash 'em into a single, purposeful, commit. Pulling together commits that have multiple purposes results in the problems you've found - bisect loses its effectiveness. "Atomic commits" are one of the topics I'll be covering in this series. Hope this helps!
- agumonkey 11y agogit's way to direct you toward surgically precise commits amazed me at first but now I am frustrated because versionning is almost part of design and I don't know how to blend the two. Maybe it's just a matter of time. But almost no commits have a single purpose, it's always scattered around the main goal, with sprinkles of side-effects.
- deleted 11y ago[deleted]