dolt
CLI commands from within a SQL session. Each procedure is named after the dolt
command line command it matches, and takes arguments in an identical form.dolt checkout -b feature-branch
is equivalent to executing the following SQL statement:dolt diff
, dolt log
, etc.) system tables are provided instead.dolt checkout feature-branch
will change the working HEAD for anyone who subsequently runs a command from the same dolt database directory, running CALL DOLT_CHECKOUT('feature-branch')
only changes the working HEAD for that database session. The right way to think of this is that the command line environment is effectively a session, one that happens to be shared with whomever runs CLI commands from that directory.DOLT_ADD()
dolt add
on the CLI, and takes the same arguments.DOLT_COMMIT()
.table
: Table(s) to add to the list tables staged to be committed. The abbreviation '.' can be used to add all tables.-A
: Stages all tables with changes.DOLT_BACKUP()
DOLT_BRANCH()
DOLT_BRANCHES
system table, instead of the DOLT_BRANCH()
stored procedure.@@<dbname>_head_ref
system variable, or the active_branch()
SQL function, as shown in the examples section below.--force
option, but be aware that active clients on other sessions will no longer be able to execute statements after their active branch is removed and will need to end their session and reconnect.-c
, --copy
: Create a copy of a branch. Must be followed by the name of the source branch to copy and the name of the new branch to create. Without the --force
option, the copy will fail if the new branch already exists.-m
, --move
: Move/rename a branch. Must be followed by the current name of an existing branch and a new name for that branch. Without the --force
option, renaming a branch in use on another server session will fail. Be aware that forcibly renaming or deleting a branch in use in another session will require that session to disconnect and reconnect before it can execute statements again.-d
, --delete
: Delete a branch. Must be followed by the name of an existing branch to delete. Without the --force
option, deleting a branch in use on another server session will fail. Be aware that forcibly renaming or deleting a branch in use in another session will require that session to disconnect and reconnect before it can execute statements again.-f
, --force
: When used with the --copy
option, allows for recreating a branch from another branch, even if the branch already exists. When used with the --move
or --delete
options, force will allow you to rename or delete branches in use in other active server sessions, but be aware that this will require those other sessions to disconnect and reconnect before they can execute statements again.-D
: Shortcut for --delete --force
.DOLT_CHECKOUT()
COMMIT
or ROLLBACK
any changes before switching to a different branch.-b
: Create a new branch with the given name.DOLT_CLEAN()
--dry-run
flag, tests whether removing untracked tables will return with zero status.--dry-run
: Test removing untracked tables from working set.DOLT_COMMIT()
dolt commit
with each value directly following the flag.DOLT_COMMIT()
also commits the current transaction.-m
, --message
: Use the given <msg>
as the commit message. Required-a
: Stages all tables with changes before committing--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.--author
: Specify an explicit author using the standard "A U Thor [email protected]" format.DOLT_FETCH()
dolt fetch
on the CLI, and takes the same arguments.--force
: Update refs to remote branches with the current state of the remote, overwriting any conflicting historyDOLT_MERGE()
dolt merge
on the CLI, and takes the same arguments.--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 <msg>, --message=<msg>
: Use the given as the commit message. This is only useful for --non-ff commits.--abort
: Abort the current conflict resolution process, and try to reconstruct the pre-merge state.COMMIT
orROLLBACK
any changes, then DOLT_COMMIT()
to create a new dolt commit on the target branch.dolt_conflicts
system tables before the transaction can be committed. See Dolt system tables for details.DOLT_RESET()
dolt reset
on the CLI, and takes the same arguments.COMMIT
the transaction for any changes to affected tables to be visible to other clients.--hard
: Resets the working tables and staged tables. Any changes to tracked tables in the working tree since are discarded.--soft
: Does not touch the working tables, but removes all tables staged to be committed. This is the default behavior.DOLT_REVERT()
--author=<author>
: Specify an explicit author using the standard A U Thor <[email protected]>
format.DOLT_PUSH()
dolt push
on the CLI, and takes the same arguments.--force
: Update the remote with local history, overwriting any conflicting history in the remote.DOLT_PULL()
dolt pull
is shorthand for dolt fetch
followed by dolt merge <remote>/<branch>
. Works exactly like dolt pull
on the CLI, and takes the same arguments.--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--force
: Ignores any foreign key warnings and proceeds with the commit.COMMIT
orROLLBACK
any changes, then DOLT_COMMIT()
to create a new dolt commit on the target branch.dolt_conflicts
system tables before the transaction can be committed. See Dolt system tables for details.