3 ms·
The only arguments I hear against the linear history model are: 1. A branching history allows use of git bisect to identify where breaking bugs were introduced
by fatbird 8y ago
The only arguments I hear against the linear history model are:
1. A branching history allows use of git bisect to identify where breaking bugs were introduced.
2. An aesthetic argument to the effect of: it's awesome to have that branching history to explore, to see alternatives and choices. A linear history is a recitation; a branching history is a multiverse.
I don't find either convincing. 2 is a personal preference, but seriously, who has time to go wandering through commit histories looking for precious gems?
1 seems like a more valid argument, but against it: who actually uses git bisect? In both essays I've reading arguing for it, they cite "once I used it to find a really gnarly bug". It doesn't seem like a useful everyday tool, or am I missing a larger set of use cases for it? Is git bisect happening a lot more than it seems to be?
- KerrickStaley 8y agogit bisect is actually easier to use with a linear commit history. And it is useful; I've root-caused regressions with it multiple times. So I think this is actually an argument in favor of linear commit history.
- umvi 8y agoWhy can't you use bisect on linear histories? git bisect bad on the bad commit, git bisect good on the good commit, and as long as there is an unbroken path in the graph from bad to good, you should be able to do a binary search.
- duncan-donuts 8y agoFor what it’s worth I use git bisect at least once a month. I tend to use it when fixing bugs in code I’m less familiar with, and the fastest way to track it down is bisect.
- aeneasmackenzie 8y agoWhat's stopping you from bisecting a linear history?
- cryptonector 8y agoIf you have thousands of contributors, then branch graph becomes incomprehensible. Only linear history will do at that point. Linear history is easier on everybody but the contributor who can't wrap their mind around it. It's easier on everyone else because git log tells them everything they need to know -- no need to chase branches -- and because commits are meaningful (because the contributor must take the time to make them so).