SVN made branching much easier by making branches really cheap, but merges remain a real problem in SVN – one that Git supposedly solves.
Does Git achieve this, and how?
(disclaimer: All I know about Git is based on the Linus lecture – total git noob here)
Git will not prevent conflict in merges but can reconcile history even when they do not share any parent ancestor.
(through The grafts file (
.git/info/grafts), which is a list, one per line, of a commit followed by its parents, that you can modify for that ‘reconciliation’ purpose.)So pretty powerful right there.
But to really have a glimpse on ‘how merges have been thought through’, you can start by turning to Linus himself, and realize this issue is not so much about ‘algorithm’:
So Wincent Colaiuta adds (emphasis mine):