Implementing Git for Data on DuckDB (Part 3): Branches, diff, pick, merge — The Version Primitives of Data
The first two posts made history readable. This one covers what makes a data version system actually useful: branches and changes. 1. The branch model A branch isn’t “a copy of the data”; it’s a combination of three things: branch = pin (which commit) + name + lineage (parent / base_line) + optional storage (materialized copy) or delta (changes relative to a base) materialize: really copy the table; reads go straight to the copy; delta: store only “which keys were removed from the base, which rows were added”; reads compose; update in a delta is a removal plus an addition of the same key (replacement pairing). This design brings the cost of “create a branch” from “copy a table” down to “register one metadata row.” ...