Dolt
GitHub RepoImpressions893
View on GitHub
@githubprojectsPost Author

Dolt: The Database That Thinks Like a Git Repository

You know that moment when you're working on a database schema and think, "I wish I could just git diff this thing"? Or when you accidentally nuke a production row and have no idea how to roll it back cleanly? That's exactly the problem Dolt was built to solve.

Dolt is a SQL database that acts like a Git repository. It's not a wrapper around MySQL or an ORM hack—it's a full relational database with version control baked in at the storage layer. You can SELECT, INSERT, and UPDATE just like you expect, but you can also commit, branch, merge, and diff your data and schema. Yes, it's as weird and wonderful as it sounds.

What It Does

Dolt is a drop-in replacement for MySQL (it speaks the MySQL wire protocol), but with every table and row tracked as a versioned entity. Think of it like a Git for your database. You can run standard SQL queries, but also execute Git-like commands directly:

  • dolt commit to snapshot your current database state.
  • dolt branch to create a fork of your data for experiments.
  • dolt merge to combine changes from different branches.
  • dolt diff to see exactly what rows changed between two commits.

Under the hood, Dolt stores your data as a content-addressed Merkle tree (yep, same structure as Git). Every row is hashed, and changes propagate up the tree. This means you get efficient diffs, fast merges, and the ability to time travel through your database history.

You can also push and pull databases from remote servers or DoltHub (the GitHub equivalent for databases), which makes team collaboration on data as natural as it is on code.

Why It's Cool

Three things make Dolt genuinely exciting for developers:

1. Reproducible data states Need to debug an issue that only happens with a specific dataset? Just dolt checkout <commit_hash> and you're looking at the exact state of the database at that point in time. No more restoring from backup dumps or praying that SELECT * gives you the right historical snapshot.

2. Collaborative schema and data changes You know that painful dance where one developer adds a column, another deletes a table, and someone else changes a data type? With Dolt, each developer works on a branch. Merge conflicts show up as row-level differences, not just SQL syntax errors. You actually get to see which rows changed, and you can resolve conflicts cell by cell. It's like Git merge conflict resolution, but for INNER JOINs.

3. Integration with existing MySQL tools Dolt speaks MySQL protocol. That means your existing ORM, migration tool, BI dashboard, or any MySQL client connects to Dolt without any changes. You can drop Dolt into your dev or staging environment and immediately start versioning everything. No new language, no new driver, no new paradigm shift. Just brew install dolt and start committing.

How to Try It

The fastest way is via Homebrew on macOS or Linux:

brew install dolt

Then spin up a Dolt SQL server:

dolt sql-server

Now connect with any MySQL client (including mysql CLI):

mysql -u root -h 127.0.0.1 --port 3306

Want to see versioning in action? Try this:

dolt init
dolt sql -q "CREATE TABLE users (id INT PRIMARY KEY, name VARCHAR(100))"
dolt sql -q "INSERT INTO users VALUES (1, 'Alice'), (2, 'Bob')"
dolt commit -m "Initial data"
# later...
dolt sql -q "UPDATE users SET name = 'Charlie' WHERE id = 1"
dolt commit -m "Updated Alice to Charlie"
dolt diff HEAD~1 HEAD

You'll see the row-level diff for the users table. That's the core magic.

You can also explore pre-built database repositories on DoltHub to see how others version their data before even installing anything.

Final Thoughts

Dolt is one of those tools that feels obvious in hindsight. We already version code, configuration, infrastructure, and even binary artifacts. Why not databases? The answer has always been "because it's hard," but Dolt proves it's not impossible.

Is it ready for every production workload? Maybe not yet. But for development, testing, staging, and any environment where you need reproducible data states, it's already incredibly useful. If you've ever wished you could git blame a row change or rollback a schema migration without panic, Dolt is worth your Sunday afternoon.


Follow us on X: @githubprojects

Back to Projects
Last updated: May 31, 2026 at 06:11 AM