top | item 46404468

(no title)

sunshowers | 2 months ago

Do you know what criss-cross merges are and why they're bad?

discuss

order

cluckindan|2 months ago

I’m sure you’re here to educate me, but this is not about criss-cross merges between two different work branches, this is about whether it’s better to rebase a work branch onto the main branch, or to pull the changes from the main branch to the work branch.

sunshowers|2 months ago

I have an early draft of a blog post about them :) as a source control expert who built both these systems and tooling on top of them for many years, I think they're the biggest and most fundamental reason rebases/linear history are better than merges.

> whether it’s better to rebase a work branch onto the main branch, or to pull the changes from the main branch to the work branch.

The problem with this is that the latter has an infinitely higher chance of resulting in criss-cross merges than the former (which is 0).