Skip to content
Dolt – It's Git for Data
Go Shell Other
Branch: master
Clone or download
bheni Add move file functionality to the filesys package (#39)
* Add move file functionality to the filesys package
Latest commit e53f027 Aug 17, 2019

Dolt — It's Git for Data

Dolt lets users collaborate on databases in the same way they collaborate on source code. Dolt is a relational database combined with the version control concepts of Git.

We also built DoltHub

DoltHub is GitHub for Dolt, a place on the internet to share Dolt repositories.

Why name a tool Dolt?

Why Dolt? To pay homage to Git! Linus Torvalds famously said he names his products after himself, Linux and Git. Git is British slang for idiot. We needed a word that meant idiot that started with 'D' for data that was short enough to type on the command line. Hence, Dolt.

Dolt Command Line

bash$ dolt
Valid commands for dolt are
                init - Create an empty Dolt data repository.
              status - Show the working tree status.
                 add - Add table changes to the list of staged table changes.
               reset - Remove table changes from the list of staged table changes.
              commit - Record changes to the repository.
                 sql - Run a SQL query against tables in repository.
          sql-server - Starts a MySQL-compatible server.
                 log - Show commit logs.
                diff - Diff a table.
               merge - Merge a branch.
              branch - Create, list, edit, delete branches.
            checkout - Checkout a branch or overwrite a table from HEAD.
              remote - Manage set of tracked repositories.
                push - Push to a dolt remote.
                pull - Fetch from a dolt remote data repository and merge.
               fetch - Update the database from a remote data repository.
               clone - Clone from a remote data repository.
               creds - Commands for managing credentials.
               login - Login to a dolt remote host.
             version - Displays the current Dolt cli version.
              config - Dolt configuration.
                  ls - List tables in the working set.
              schema - Display the schema for table(s)
               table - Commands for creating, reading, updating, and deleting tables.
           conflicts - Commands for viewing and resolving merge conflicts.

Getting Started


Dolt receives regular binary releases for Windows, macOS and Linux which are available at The ./bin directory of your platforms tarball should be placed on your path so you can run dolt.

Installing from source requires Go 1.13+. Using go install:

$ go install
$ go install
$ go install

Or from a checkout of the repository:

$ cd go
$ go install ./cmd/dolt
$ go install ./cmd/git-dolt
$ go install ./cmd/git-dolt-smudge

Global Config

Setup your name and email by running:

$ dolt config --global --add YOU@DOMAIN.COM
$ dolt config --global --add "YOUR NAME"

First Repository

Make a directory with nothing in it, initialize a dolt repository, and create a schema:

$ mkdir first_dolt_repo
$ cd first_dolt_repo
$ dolt init
Successfully initialized dolt data repository.
$ dolt sql -q "create table state_populations ( state varchar, population int, primary key (state) )"
$ dolt sql -q "show tables"
| tables            |
| state_populations |
$ dolt sql -q 'insert into state_populations (state, population) values
("Delaware", 59096),
("Maryland", 319728),
("Tennessee", 35691),
("Virginia", 691937),
("Connecticut", 237946),
("Massachusetts", 378787),
("South Carolina", 249073),
("New Hampshire", 141885),
("Vermont", 85425),
("Georgia", 82548),
("Pennsylvania", 434373),
("Kentucky", 73677),
("New York", 340120),
("New Jersey", 184139),
("North Carolina", 393751),
("Maine", 96540),
("Rhode Island", 68825)
$ dolt add .
$ dolt commit -m 'adding state populations from 1790.'

Now you can interact with the repository, as in dolt log or dolt sql -q "select * from state_populations".

Credits and License

The implementation of Dolt makes use of code and ideas from noms.

Dolt is licensed under the Apache License, Version 2.0. See LICENSE for details.

You can’t perform that action at this time.