4 ms·
In practical terms, fixing merge conflicts and running git bisect are a lot more time consuming when you have a lot of merge commits.
by Apes 3y ago
In practical terms, fixing merge conflicts and running git bisect are a lot more time consuming when you have a lot of merge commits.
- kevingadd 3y agoIt's just plain harder to reason about the history of a branch when there are a bunch of merge commits in it. Even if I'm not using bisect (I rarely do), having the 'git log' be polluted by merges makes it harder for me to fit everything into my head. I also prefer to think about my branches as 'here is a stack of commits on top of a fixed point in time', so having merges in the middle of that flow makes it much harder to reason about that way. Rebasing to choose a new fixed point is much simpler.
- feanaro 3y ago> Even if I'm not using bisect (I rarely do), having the 'git log' be polluted by merges makes it harder for me to fit everything into my head. How and why? Done properly, a merge commit of a PR breach is semantically equivalent to a squashed PR commit, from the perspective of the "trunk"/main/master branch. It is the commit introducing all of the changes of the PR branch into the trunk branch. If you're about to reason about squashed PR commits, you should be able to reason about merge commits. The only difference is that with merge commits you still have the individual commit granularity available, should you be interested in it.
- rand_flip_bit 3y agoBoth the git log and git bisect commands accept the --first-parent flag, which eliminates the complexities of dealing with merge commits in the history.