Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 42 additions & 8 deletions packages/dolt/content/reference/cli/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ Valid commands for dolt are
tag - Create, list, delete tags.
blame - Show what revision and author last modified each row of a table.
constraints - Commands for handling constraints.
migrate - Executes a database migration to use the latest Dolt data format.
read-tables - Fetch table(s) at a specific commit into a new dolt repo
gc - Cleans up unreferenced data from the repository.
fsck - Verifies the contents of the database are not corrupted. Provides repair when possible.
Expand Down Expand Up @@ -201,6 +200,9 @@ When printing the list of backups adds additional details.
`-f`, `--force`:
When restoring a backup, overwrite the contents of the existing database with the same name.

`--ref`:
Git ref to use as the Dolt data ref for git remotes (default: refs/dolt/data).

`--aws-region`

`--aws-creds-type`
Expand Down Expand Up @@ -288,7 +290,7 @@ Set upstream configuration for a branch.
List branches

`-v`, `--verbose`:
When in list mode, show the hash and commit subject line for each head
When in list mode, show the hash and commit subject line for each head, along with relationship to upstream branch (if any). If given twice, print the name of the upstream branch as well

`-a`, `--all`:
When in list mode, shows remote tracked branches
Expand Down Expand Up @@ -565,19 +567,21 @@ Deletes untracked working tables
**Synopsis**

```bash
dolt clean [--dry-run]
dolt clean [--dry-run] <tables>...
dolt clean [--dry-run] [-x]
dolt clean [--dry-run] [-x] <tables>...
```

**Description**

`dolt clean [--dry-run]`
`dolt clean [--dry-run] [-x]`

The default (parameterless) form clears the values for all untracked working `<tables>` .This command permanently deletes unstaged or uncommitted tables.
The default (parameterless) form clears the values for all untracked working `<tables>` .This command permanently deletes unstaged or uncommitted tables. By default, tables matching dolt_ignore or dolt_nonlocal_tables are not removed.

The `--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>`...`
The `-x` flag causes dolt_ignore to be ignored so that untracked tables matching dolt_ignore are removed; dolt_nonlocal_tables is always respected (similar to git clean -x).

`dolt clean [--dry-run] [-x] `<tables>`...`

If `<tables>` is specified, only those table names are considered for deleting.

Expand All @@ -588,6 +592,9 @@ If `<tables>` is specified, only those table names are considered for deleting.
`--dry-run`:
Tests removing untracked tables without modifying the working set.

`-x`, `--x`:
Do not respect dolt_ignore; remove untracked tables that match dolt_ignore. dolt_nonlocal_tables is always respected.



## `dolt clone`
Expand Down Expand Up @@ -620,6 +627,9 @@ The branch to be cloned. If not specified all branches will be cloned.
`--depth`:
Clone a single branch and limit history to the given commit depth.

`--ref`:
Git ref to use as the Dolt data ref for git remotes (default: refs/dolt/data).

`--aws-region`

`--aws-creds-type`
Expand Down Expand Up @@ -1559,6 +1569,7 @@ Join two or more development histories together
```bash
dolt merge [--squash] <branch>
dolt merge --no-ff [-m message] <branch>
dolt merge --ff-only <branch>
dolt merge --abort
```

Expand All @@ -1576,6 +1587,9 @@ The second syntax (`<dolt merge --abort>`) can only be run after the merge has r
`--no-ff`:
Create a merge commit even when the merge resolves as a fast-forward.

`--ff-only`:
Refuse to merge unless the current HEAD is already up to date or the merge can be resolved as a fast-forward.

`--squash`:
Merge changes to the working set without updating the commit history

Expand Down Expand Up @@ -1710,6 +1724,9 @@ Merge 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.

`--ff-only`:
Refuse to merge unless the current HEAD is already up to date or the merge can be resolved as a fast-forward.

`-f`, `--force`:
Update from the remote HEAD even if there are errors.

Expand Down Expand Up @@ -1828,6 +1845,9 @@ A shallow clone operation will retrieve the state of table(s) from a remote repo
`-d`, `--dir`:
directory to create and put retrieved table data.

`--ref`:
Git ref to use as the Dolt data ref for git remotes (default: refs/dolt/data).



## `dolt rebase`
Expand All @@ -1837,7 +1857,7 @@ Reapplies commits on top of another base tip
**Synopsis**

```bash
dolt rebase (-i | --interactive) [--empty=drop|keep] <upstream>
dolt rebase [-i | --interactive] [--empty=drop|keep] <upstream>
dolt rebase (--continue | --abort)
```

Expand Down Expand Up @@ -1935,6 +1955,9 @@ Remove the remote named `<name>`. All remote-tracking branches and configuration

**Arguments and options**

`--ref`:
Git ref to use as the Dolt data ref for git remotes (default: refs/dolt/data).

`-v`, `--verbose`:
When printing the list of remotes adds additional details.

Expand Down Expand Up @@ -2415,6 +2438,17 @@ This is an example yaml configuration file showing all supported items and their



ENVIRONMENT VARIABLE INTERPOLATION:

SQL server yaml configs support environment variable interpolation:

${VAR} Expands to the value of VAR (error if VAR is unset or empty)
$$ Escapes to a literal '$'

Notes:
- Interpolation happens before YAML parsing.
- Quote values for string fields when needed (e.g. values containing ':'), but do not quote placeholders intended for numeric/bool fields.

SUPPORTED CONFIG FILE FIELDS:

`data_dir`: A directory where the server will load dolt databases to serve, and create new ones. Defaults to the current directory.
Expand Down