Knowledge Base

Dolt: Git-Style Version Control for SQL Databases

Dolt: Git-Style Version Control for SQL Databases

Source: https://github.com/dolthub/dolt

📌 Dolt is an open-source, MySQL-compatible SQL database with Git-style version control built into the storage layer for both schema and data. Teams can branch, merge, diff, and share databases via CLI, SQL, and DoltHub the same way they version source code.

🔀 Git for Data

Fork, clone, branch, merge, push, and pull tables—not just files. Version control is in the storage layer with a full commit graph, cell-level diffs, and conflict detection.

🔌 MySQL-Compatible

Speaks the MySQL wire protocol and SQL, so existing apps and tools can connect with little or no change while version-control features sit on a Git-like CLI and in SQL.

⌨️ CLI + SQL Surface

CLI mirrors Git (commit, branch, merge, diff, push, pull). SQL exposes history via system tables and version-control writes through procedures and functions.

☁️ DoltHub & Ecosystem

DoltHub is the hosted remote for sharing DBs and data pull requests. Doltgres targets the same model with PostgreSQL; recent releases support Git remotes as Dolt remotes.

🎯 Where It Fits

Built for collaborative data work, audit trails, ML/test datasets, config-style tables, and production changes that need review and rollback—workflows ordinary RDBMSs handle poorly.

Key facts

Fact Value
Model “Git for Data” — versions tables, not files
Compatibility MySQL-compatible wire protocol and SQL
Version control Built into storage; commit graph with cell-level diffs
Hosting DoltHub for remotes, sharing, and data PRs
Related project Doltgres (PostgreSQL-flavored variant)
Origin DoltHub team; initial release ~August 2019

Details

Dolt is an open-source SQL database that brings full Git-style version control to tables rather than files. You can fork, clone, branch, merge, push, and pull both schema and data the same way you version source code. It is MySQL-compatible, so applications and tools that speak MySQL can connect and query it without major code changes, while version-control features are exposed on a Git-like CLI and in SQL via system tables, functions, and stored procedures.

What makes Dolt distinctive is that version control is built into the storage layer, not bolted on with schema migrations or external dumps. All history lives in a commit graph, so you can efficiently diff any two commits, merge branches, and get cell-level diffs and conflict detection. That matters for collaborative data work, audit trails, ML and test datasets, config-style tables, and production changes that need review and rollback.

Teams use Dolt offline like a data repository or online as a running server. DoltHub is the hosted counterpart (analogous to GitHub) for sharing databases, pull requests on data, and team review. A related project, DoltgreSQL (Doltgres), aims at the same version-control model with a PostgreSQL flavor. Recent releases have also added support for using Git remotes as Dolt remotes so versioned databases can sit beside application code.

Sources