dolt-init
Initialize a new Dolt repository
TLDR
Initialize a new Dolt data repository in the current directory
Initialize a new Dolt data repository creating a commit with the specified metadata
SYNOPSIS
dolt init [-q] [-n name] [-e email]
PARAMETERS
-q
Run in quiet mode. Only prints errors.
-n name
The name of the user to be stored in the dolt configuration.
-e email
The email of the user to be stored in the dolt configuration.
DESCRIPTION
The dolt init command creates a new Dolt repository in the current directory or the directory specified. A Dolt repository is a version-controlled SQL database. This command essentially initializes the necessary data structures and files within the specified directory to track changes to the database's schema and data over time.
After initializing a Dolt repository, you can start defining your database schema (tables, columns, etc.), importing data, and committing those changes, much like using `git` for code version control. The database's history is stored using a data structure which is similar to a Merkle tree which is what makes it fast and efficient. The database is stored on the file system on the disk, and can be accessed using regular SQL queries with the Dolt command line interface.
CAVEATS
The `dolt init` command must be executed in an empty directory (or a directory that doesn't already contain a Dolt repository). Running it in an existing repository will result in an error. The command creates the `.dolt` directory which must be kept to maintain the repo.
USAGE EXAMPLES
1. Initialize a new Dolt repository in the current directory: `dolt init`
2. Initialize a new Dolt repository with a specific user name and email: `dolt init -n "John Doe" -e "john.doe@example.com"`
3. Intialize a new Dolt repository in quiet mode `dolt init -q`
HISTORY
dolt is a relatively new project, with active development to bring database version control to users. `dolt init` is a core command, providing the base to create the version controlled database. The options have mostly remained stable, with improvements for user configuration.
SEE ALSO
dolt clone(1), dolt commit(1), dolt sql(1), dolt status(1)