dolt init
--name
: The name used in commits to this repo. If not provided will be taken from user.name
in the global config.--email
: The email address used. If not provided will be taken from user.email
in the global config.--date
: Specify the date used in the initial commit. If not specified the current system time is used.-b
, --initial-branch
: The branch name used to initialize this database. If not provided will be taken from init.defaultbranch
in the global config. If unset, the default initialized branch will be named 'main'.dolt status
dolt commit
; the second and third are what you could commit by running dolt add .
before running dolt commit
.dolt add
<table>
: Working table(s) to add to the list tables staged to be committed. The abbreviation '.' can be used to add all tables.-A
, --all
: Stages any and all changes (adds, deletes, and modifications).dolt diff
dolt diff [--options] [<tables>...]
This form is to view the changes you made relative to the staging area for the next commit. In other words, the differences are what you could tell Dolt to further add but you still haven't. You can stage these changes by using dolt add.dolt diff [--options] <commit> [<tables>...]
This form is to view the changes you have in your working tables relative to the named <commit>
. You can use HEAD to compare it with the latest commit, or a branch name to compare with the tip of a different branch.dolt diff [--options] <commit> <commit> [<tables>...]
This is to view the changes between two arbitrary commit
.--limit N
where N
is the number of diffs to display.--where key=value
can be used. The key in this case would be either to_COLUMN_NAME
or from_COLUMN_NAME
. where from_COLUMN_NAME=value
would filter based on the original value and to_COLUMN_NAME
would select based on its updated value.-d
, --data
: Show only the data changes, do not show the schema changes (Both shown by default).-s
, --schema
: Show only the schema changes, do not show the data changes (Both shown by default).--summary
: Show summary of data changes-r
, --result-format
: How to format diff output. Valid values are tabular & sql. Defaults to tabular.--where
: filters columns based on values in the diff. See dolt diff --help
for details.--limit
: limits to the first N diffs.-c
, --cached
: Show only the unstaged data changes.dolt reset
dolt reset <tables>...
<tables>
to their values at HEAD
. It does not affect the working tree or the current branch.dolt reset <tables>
is the opposite of dolt add <tables>
.dolt reset <tables>
to update the staged tables, you can use dolt checkout
to check the contents out of the staged tables to the working tables.dolt reset [--hard | --soft] <revision>
dolt reset .
all
staged tables to their values at HEAD. It is the opposite of dolt add .
--hard
: Resets the working tables and staged tables. Any changes to tracked tables in the working tree since <commit>
are discarded.--soft
: Does not touch the working tables, but removes all tables staged to be committed.dolt clean
dolt clean [--dry-run]
<tables>
.This command permanently deletes unstaged or uncommitted tables.--dry-run
flag can be used to test whether the clean can succeed without deleting any tables from the current working set.dolt clean [--dry-run] ...
<tables>
is specified, only those table names are considered for deleting.--dry-run
: Tests removing untracked tables without modifying the working set.dolt commit
-m <msg>
. If the <-m>
parameter is not provided an editor will be opened where you can review the commit and provide a log message.<YYYY-MM-DD>
, <YYYY-MM-DDTHH:MM:SS>
, or <YYYY-MM-DDTHH:MM:SSZ07:00>
(where <07:00>
is the time zone offset)."-m
, --message
: Use the given <msg>
as the commit message.--allow-empty
: Allow recording a commit that has the exact same data as its sole parent. This is usually a mistake, so it is disabled by default. This option bypasses that safety.--date
: Specify the date used in the commit. If not specified the current system time is used.-f
, --force
: Ignores any foreign key warnings and proceeds with the commit.--author
: Specify an explicit author using the standard A U Thor <[email protected]>
format.-a
, --all
: Adds all edited files in working to staged.dolt sql
-q
option, runs the given query and prints any results, then exits.-b
to enable batch mode to speed up large batches of INSERT / UPDATE statements. Pipe SQL files to dolt sql (no -q
) to execute a SQL import or update script.-s
. Alternatively -x
can be used to execute a saved query by name.--multi-db-dir <directory>
uses each of the subdirectories of the supplied directory (each subdirectory must be a valid dolt data repository) as databases. Subdirectories starting with '.' are ignored.-q
, --query
: Runs a single query and exits-r
, --result-format
: How to format result output. Valid values are tabular, csv, json, vertical. Defaults to tabular.-s
, --save
: Used with --query, save the query to the query catalog with the name provided. Saved queries can be examined in the dolt_query_catalog system table.-x
, --execute
: Executes a saved query with the given name-l
, --list-saved
: List all saved queries-m
, --message
: Used with --query and --save, saves the query with the descriptive message given. See also --name-b
, --batch
: Use to enable more efficient batch processing for large SQL import scripts consisting of only INSERT statements. Other statements types are not guaranteed to work in this mode.--multi-db-dir
: Defines a directory whose subdirectories should all be dolt data repositories accessible as independent databases within-c
, --continue
: Continue running queries on an error. Used for batch mode only.--file
: Execute statements from the file given--privilege-file
: Path to a file to load and store users and grants. Without this flag, the database has a single user with all permissions, and more cannot be added.dolt sql-server
--config <file>
, or by using the supported switches and flags to configure the server directly on the command line. If --config <file>
is provided all other command line arguments are ignored.vlog_level
: Level of logging provided. Options are: trace
, debug
, info
, warning
, error
, and fatal
.behavior.read_only
: If true database modification is disabledbehavior.autocommit
: If true write queries will automatically alter the working set. When working with autocommit enabled it is highly recommended that listener.max_connections be set to 1 as concurrency issues will arise otherwiseuser.name
: The username that connections should use for authenticationuser.password
: The password that connections should use for authentication.listener.host
: The host address that the server will run on. This may be localhost
or an IPv4 or IPv6 addresslistener.port
: The port that the server should listen onlistener.max_connections
: The number of simultaneous connections that the server will acceptlistener.read_timeout_millis
: The number of milliseconds that the server will wait for a read operationlistener.write_timeout_millis
: The number of milliseconds that the server will wait for a write operationperformance.query_parallelism
: Amount of go routines spawned to process each querydatabases
: a list of dolt data repositories to make available as SQL databases. If databases is missing or empty then the working directory must be a valid dolt data repository which will be made available as a SQL databasedatabases[i].path
: A path to a dolt data repositorydatabases[i].name
: The name that the database corresponding to the given path should be referenced via SQL--config
: When provided configuration is taken from the yaml config file and all command line parameters are ignored.-H
, --host
: Defines the host address that the server will run on (default localhost
)-P
, --port
: Defines the port that the server will run on (default 3306
)-u
, --user
: Defines the server user (default root
)-p
, --password
: Defines the server password (default ``)-t
, --timeout
: Defines the timeout, in seconds, used for connections A value of 0
represents an infinite timeout (default 28800000
)-r
, --readonly
: Disable modification of the database-l
, --loglevel
: Defines the level of logging provided Options are: trace',
debug,
info,
warning,
error,
fatal(default
info`)--multi-db-dir
: Defines a directory whose subdirectories should all be dolt data repositories accessible as independent databases.--no-auto-commit
: Set @@autocommit = off for the server--query-parallelism
: Set the number of go routines spawned to handle each query (default 2
)--max-connections
: Set the number of connections handled by the server (default 100
)--persistence-behavior
: Indicate whether to load
or ignore
persisted global variables (default load
)--privilege-file
: Path to a file to load and store users and grants. Without this flag, the database has a single user with all permissions, and more cannot be added.dolt sql-client
dolt sql-server
, this command may use a YAML configuration file or command line arguments. For more information on the YAML file, refer to the documentation on dolt sql-server
.--config
: When provided configuration is taken from the yaml config file and all command line parameters are ignored.-H
, --host
: Defines the host address that the server will run on (default localhost
)-P
, --port
: Defines the port that the server will run on (default 3306
)-u
, --user
: Defines the server user (default root
)-p
, --password
: Defines the server password (default ``)-t
, --timeout
: Defines the timeout, in seconds, used for connections A value of 0
represents an infinite timeout (default 28800000
)-r
, --readonly
: Disable modification of the database-l
, --loglevel
: Defines the level of logging provided Options are: trace',
debug,
info,
warning,
error,
fatal(default
info`)--multi-db-dir
: Defines a directory whose subdirectories should all be dolt data repositories accessible as independent databases.--no-auto-commit
: Set @@autocommit = off for the server--query-parallelism
: Set the number of go routines spawned to handle each query (default 2
)--max-connections
: Set the number of connections handled by the server (default 100
)--persistence-behavior
: Indicate whether to load
or ignore
persisted global variables (default load
)--privilege-file
: Path to a file to load and store users and grants. Without this flag, the database has a single user with all permissions, and more cannot be added.-d
, --dual
: Causes this command to spawn a dolt server that is automatically connected to.dolt log
-n
, --number
: Limit the number of commits to output.--min-parents
: The minimum number of parents a commit must have to be included in the log.--merges
: Equivalent to min-parents == 2, this will limit the log to commits with 2 or more parents.--parents
: Shows all parents of each commit in the log.--decorate
: Shows refs next to commits. Valid options are short, full, no, and auto--oneline
: Shows logs in a compact format.dolt branch
--list
is given, or if there are no non-option arguments, existing branches are listed. The current branch will be highlighted with an asterisk. With no options, only local branches are listed. With -r
, only remote branches are listed. With -a
both local and remote branches are listed. -v
causes the hash of the commit that the branches are at to be printed as well.<branchname>
which points to the current HEAD
, or <start-point>
if given.dolt checkout <newbranch>
to switch to the new branch.-m
, <oldbranch>
will be renamed to <newbranch>
. If <newbranch>
exists, -f must be used to force the rename to happen.-c
options have the exact same semantics as -m
, except instead of the branch being renamed it will be copied to a new name.-d
, <branchname>
will be deleted. You may specify more than one branch for deletion.<start-point>
: A commit that a new branch should point at.--list
: List branches-f
, --force
: Reset <branchname>
to <startpoint>
, even if <branchname>
exists already. Without -f
, dolt branch
refuses to change an existing branch. In combination with -d
(or --delete
), allow deleting the branch irrespective of its merged status. In combination with -m (or --move
), allow renaming the branch even if the new branch name already exists, the same applies for -c
(or --copy
).-c
, --copy
: Create a copy of a branch.-m
, --move
: Move/rename a branch-d
, --delete
: Delete a branch. The branch must be fully merged in its upstream branch.--D
: Shortcut for --delete --force
.-v
, --verbose
: When in list mode, show the hash and commit subject line for each head-a
, --all
: When in list mode, shows remote tracked branches-r
, --remote
: When in list mode, show only remote tracked branches. When with -d, delete a remote tracking branch.--show-current
: Print the name of the current branchdolt checkout
<branch>
To prepare for working on <branch>
, switch to it by updating the index and the tables in the working tree, and by pointing HEAD at the branch. Local modifications to the tables in the working tree are kept, so that they can be committed to the <branch>
.<new_branch>
[<start_point>
] Specifying -b causes a new branch to be created as if dolt branch were called and then checked out.<table>
... To update table(s) with their values in HEAD--b
: Create a new branch named <new_branch>
and start it at <start_point>
.-f
, --force
: If there is any changes in working set, the force flag will wipe out the current changes and checkout the new branch.dolt merge
<dolt merge --abort>
) can only be run after the merge has resulted in conflicts. dolt merge --abort
will abort the merge process and try to reconstruct the pre-merge state. However, if there were uncommitted changes when the merge started (and especially if those changes were further modified after the merge was started), dolt merge --abort
will in some cases be unable to reconstruct the original (pre-merge) changes. Therefore:<Warning>
: Running dolt merge with non-trivial uncommitted changes is discouraged: while possible, it may leave you in a state that is hard to back out of in the case of a conflict.--no-ff
: Create a merge commit even when the merge resolves as a fast-forward.--squash
: Merges changes to the working set without updating the commit history-m
, --message
: Use the given <msg>
as the commit message.--abort
: Abort the current conflict resolution process, and try to reconstruct the pre-merge state.dolt merge --abort
will be unable to reconstruct these changes. It is therefore recommended to always commit or stash your changes before running dolt merge.dolt conflicts cat
<table>
: List of tables to be printed. '.' can be used to print conflicts for all tables.dolt conflicts resolve
dolt conflicts resolve <table> <key>...
, resolve runs in manual merge mode resolving the conflicts whose keys are provided.dolt conflicts resolve --ours|--theirs <table>...
, resolve runs in auto resolve mode. Where conflicts are resolved using a rule to determine which version of a row should be used.<table>
: List of tables to be printed. When in auto-resolve mode, '.' can be used to resolve all tables.<key>
: key(s) of rows within a table whose conflicts have been resolved--ours
: For all conflicts, take the version from our branch and resolve the conflict--theirs
: For all conflicts, take the version from their branch and resolve the conflictdolt cherry-pick
dolt revert
HEAD\~1
), this is similar to applying the patch from HEAD\~1..HEAD\~2
, giving us a patch of what to remove to effectively remove the influence of the specified commit. If multiple commits are specified, then this process is repeated for each commit in the order specified. This requires a clean working set.<revision>
: The commit revisions. If multiple revisions are given, they're applied in the order given.--author
: Specify an explicit author using the standard A U Thor <[email protected]>
format.dolt clone
<dolt branch -a>
), and creates and checks out an initial branch that is forked from the cloned repository's currently active branch.dolt fetch
without arguments will update all the remote-tracking branches, and a dolt pull
without arguments will in addition merge the remote branch into the current branch.<refs/remotes/origin>
and by creating a remote named 'origin'.--remote
: Name of the remote to be added. Default will be 'origin'.-b
, --branch
: The branch to be cloned. If not specified all branches will be cloned.--aws-region
--aws-creds-type
--aws-creds-file
: AWS credentials file.--aws-creds-profile
: AWS profile to use.dolt fetch
origin
. The <remote>
parameter allows you to specify the name of a different remote you wish to pull from by the remote's name.-f
, --force
: Update refs to remote branches with the current state of the remote, overwriting any conflicting history.dolt pull
dolt pull
is shorthand for dolt fetch
followed by dolt merge <remote>/<branch>
.dolt fetch
with the given parameters and calls dolt merge
to merge the retrieved branch HEAD
into the current branch.--squash
: Merges changes to the working set without updating the commit history--no-ff
: Create a merge commit even when the merge resolves as a fast-forward.-f
, --force
: Ignores any foreign key warnings and proceeds with the commit.dolt push
<remote>
argument, an attempt is made to infer the remote. If only one remote exists it will be used, if multiple remotes exists, a remote named 'origin' will be attempted. If there is more than one remote, and none of them are named 'origin' then the command will fail and you will need to specify the correct remote explicitly.<refspec>
... then the current branch will be used.-u
, --set-upstream
: For every branch that is up to date or successfully pushed, add upstream (tracking) reference, used by argument-less dolt pull
and other commands.-f
, --force
: Update the remote with local history, overwriting any conflicting history in the remote.dolt config
--global
: Use global config.--local
: Use repository local config.--add
: Set the value of one or more config parameters--list
: List the values of all config parameters.--get
: Get the value of one or more config parameters.--unset
: Unset the value of one or more config parameters.dolt remote
add
Adds a remote named <name>
for the repository at <url>
. The command dolt fetch <name>
can then be used to create and update remote-tracking branches <name>/<branch>
.<url>
parameter supports url schemes of http, https, aws, gs, and file. The url prefix defaults to https. If the <url>
parameter is in the format <organization>/<repository>
then dolt will use the remotes.default_host
from your configuration file (Which will be dolthub.com unless changed).aws://[dynamo-table:s3-bucket]/database
. You may configure your aws cloud remote using the optional parameters aws-region
, aws-creds-type
, aws-creds-file
.remove
, rm
Remove the remote named <name>
. All remote-tracking branches and configuration settings for the remote are removed.<region>
: cloud provider region associated with this remote.<creds-type>
: credential type. Valid options are role, env, and file. See the help section for additional details.<profile>
: AWS profile to use.-v
, --verbose
: When printing the list of remotes adds additional details.--aws-region
--aws-creds-type
--aws-creds-file
: AWS credentials file--aws-creds-profile
: AWS profile to usedolt backup
add
Adds a backup named <name>
for the database at <url>
. The <url>
parameter supports url schemes of http, https, aws, gs, and file. The url prefix defaults to https. If the <url>
parameter is in the format <organization>/<repository>
then dolt will use the backups.default_host
from your configuration file (Which will be dolthub.com unless changed). The URL address must be unique to existing remotes and backups.aws://[dynamo-table:s3-bucket]/database
. You may configure your aws cloud backup using the optional parameters aws-region
, aws-creds-type
, aws-creds-file
.remove
, rm
Remove the backup named <name>
. All configuration settings for the backup are removed. The contents of the backup are not affected.restore
Restore a Dolt database from a given <url>
into a specified directory <url>
.sync
Snapshot the database and upload to the backup <name>
. This includes branches, tags, working sets, and remote tracking refs.sync-url
Snapshot the database and upload the backup to <url>
. Like sync, this includes branches, tags, working sets, and remote tracking refs, but it does not require you to create a named backup<region>
: cloud provider region associated with this backup.<creds-type>
: credential type. Valid options are role, env, and file. See the help section for additional details.<profile>
: AWS profile to use.-v
, --verbose
: When printing the list of backups adds additional details.--aws-region
--aws-creds-type
--aws-creds-file
: AWS credentials file--aws-creds-profile
: AWS profile to usedolt login
<creds>
: A specific credential to use for login. If omitted, new credentials will be generated.-e
, --auth-endpoint
: Specify the endpoint used to authenticate this client. Must be used with --login-url OR set in the configuration file as creds.add_url
-url
, --login-url
: Specify the login url where the browser will add credentials.-i
, --insecure
: If set, makes insecure connection to remote authentication serverdolt creds new
dolt creds rm
dolt creds ls
*
next to it.-v
, --verbose
: Verbose output, including key id.dolt creds check
--endpoint
: API endpoint, otherwise taken from config.--creds
: Public Key ID or Public Key for credentials, otherwise taken from config.dolt creds use
dolt creds import
<jwk_filename>
: The JWK file. If omitted, import operates on stdin.--no-profile
: If provided, no attempt will be made to contact doltremoteapi and update user.name and user.email.dolt ls
--verbose
flag is provided a row count and a hash of the table will also be displayed.--system
flag is supplied this will show the dolt system tables which are queryable with SQL. Some system tables can be queried even if they are not in the working set by specifying appropriate parameters in the SQL queries. To see these tables too you may pass the --verbose
flag.--all
flag is supplied both user and system tables will be printed.-v
, --verbose
: show the hash of the table-s
, --system
: show system tables-a
, --all
: show system tablesdolt schema export
table
is given, only that table's schema will be exported, otherwise all table schemas will be exported.file
is given, the exported schemas will be written to that file, otherwise they will be written to standard out.<table>
: table whose schema is being exported.<file>
: the file to which the schema will be exported.dolt schema import
--create | -c
is given the operation will create <table>
with a schema that it infers from the supplied file. One or more primary key columns must be specified using the --pks
parameter.--update | -u
is given the operation will update <table>
any additional columns, or change the types of columns based on the file supplied. If the --keep-types
parameter is supplied then the types for existing columns will not be modified, even if they differ from what is in the supplied file.--replace | -r
is given the operation will replace <table>
with a new, empty table which has a schema inferred from the supplied file but columns tags will be maintained across schemas. --keep-types
can also be supplied here to guarantee that types are the same in the file and in the pre-existing table.--file-type
parameter should be used to explicitly define the format of the file in one of the supported formats (Currently only csv is supported). For files separated by a delimiter other than a ',', the --delim parameter can be used to specify a delimiter.--dry-run
is supplied a sql statement will be generated showing what would be executed if this were run without the --dry-run flag--float-threshold
is the threshold at which a string representing a floating point number should be interpreted as a float versus an int. If FloatThreshold is 0.0 then any number with a decimal point will be interpreted as a float (such as 0.0, 1.0, etc). If FloatThreshold is 1.0 then any number with a decimal point will be converted to an int (0.5 will be the int 0, 1.99 will be the int 1, etc. If the FloatThreshold is 0.001 then numbers with a fractional component greater than or equal to 0.001 will be treated as a float (1.0 would be an int, 1.0009 would be an int, 1.001 would be a float, 1.1 would be a float, etc)<table>
: Name of the table to be created.<file>
: The file being used to infer the schema.-c
, --create
: Create a table with the schema inferred from the <file>
provided.-u
, --update
: Update a table to match the inferred schema of the <file>
provided-r
, --replace
: Replace a table with a new schema that has the inferred schema from the <file>
provided. All previous data will be lost.--dry-run
: Print the sql statement that would be run if executed without the flag.--keep-types
: When a column already exists in the table, and it's also in the <file>
provided, use the type from the table.--file-type
: Explicitly define the type of the file if it can't be inferred from the file extension.--pks
: List of columns used as the primary key cols. Order of the columns will determine sort order.-m
, --map
: A file that can map a column name in <file>
to a new value.--float-threshold
: Minimum value at which the fractional component of a value must exceed in order to be considered a float.--delim
: Specify a delimiter for a csv style file with a non-comma delimiter.dolt schema show
dolt schema show
displays the schema of tables at a given commit. If no commit is provided the working set will be used.<table>
: table(s) whose schema is being displayed.<commit>
: commit at which point the schema will be displayed.dolt schema tags
dolt schema tags
displays the column tags of tables on the working set.<table>
: table(s) whose tags will be displayed.-r
, --result-format
: How to format result output. Valid values are tabular, csv, json. Defaults to tabular.dolt table import
--create-table | -c
is given the operation will create <table>
and import the contents of file into it. If a table already exists at this location then the operation will fail, unless the --force | -f
flag is provided. The force flag forces the existing table to be overwritten.--pk
parameter must supply the name of the field that should be used as the primary key.--update-table | -u
is given the operation will update <table>
with the contents of file. The table's existing schema will be used, and field names will be used to match file fields with table fields unless a mapping file is specified.--continue
flag to continue importing when an error is encountered. You can add the --ignore-skipped-rows
flag to prevent the import utility from printing all the skipped rows.--replace-table | -r
is given the operation will replace <table>
with the contents of the file. The table's existing schema will be used, and field names will be used to match file fields with table fields unless a mapping file is specified.-c -f
.--file-type
parameter should be used to explicitly define the format of the file in one of the supported formats (csv, psv, json, xlsx). For files separated by a delimiter other than a ',' (type csv) or a '|' (type psv), the --delim parameter can be used to specify a delimiter<table>
: The new or existing table being imported to.<file>
: The file being imported. Supported file types are csv, psv, and nbf.-c
, --create-table
: Create a new table, or overwrite an existing table (with the -f flag) from the imported data.-u
, --update-table
: Update an existing table with the imported data.-f
, --force
: If a create operation is being executed, data already exists in the destination, the force flag will allow the target to be overwritten.-r
, --replace-table
: Replace existing table with imported data while preserving the original schema.--continue
: Continue importing when row import errors are encountered.--ignore-skipped-rows
: Ignore the skipped rows printed by the --continue flag.--disable-fk-checks
: Disables foreign key checks.-s
, --schema
: The schema for the output data.-m
, --map
: A file that lays out how fields should be mapped from input data to output data.-pk