Example: main -> Branch A -> Lots of commits on A -> Branch B -> Lots of commits on B
Now we squash and merge A into main. B now has all of A's commit history, plus some of its own, instead of just it's own. Rebasing main in causes a lot of conflicts.
It takes some git gymnastics to transplant the merge back onto main cleanly.
This is basically exactly the same as checking out a fresh branch from main and cherry picking the commits from branch B.
But for true decentralized developments, when the developer is not really part of the same organigram, I'd prefer the remote branch to be cleaned up with clear commits. in this case, I will merge.
kcrwfrd_•9mo ago