← 返回命令列表

Linux command

dolt 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Initialize a repository

dolt init

Clone a repository

dolt clone [owner/repo]

Check status

dolt status

Add changes

dolt add [table_name]

Commit changes

dolt commit -m "[message]"

Run SQL query

dolt sql -q "[SELECT * FROM table]"

Start SQL server

dolt sql-server

Push to remote

dolt push origin main

说明

Dolt is a SQL database with Git-like version control. It combines a fully-functional relational database with branch, merge, diff, and clone operations familiar from Git. Data is stored in tables queryable via standard SQL (MySQL-compatible). Changes can be staged, committed, and pushed to remotes like DoltHub. Branches allow parallel development with merge capabilities including conflict resolution. Dolt enables use cases like data versioning, collaborative data editing, reproducible data pipelines, and auditable data changes with complete history.

参数

init
Initialize new repository.
clone _REPO_
Clone remote repository.
status
Show working tree status.
add _TABLE_
Stage table changes.
commit -m _MSG_
Commit staged changes.
sql -q _QUERY_
Execute SQL query.
sql-server
Start MySQL-compatible server.
push _REMOTE_ _BRANCH_
Push to remote.
--help
Display help information.

FAQ

What is the dolt command used for?

Dolt is a SQL database with Git-like version control. It combines a fully-functional relational database with branch, merge, diff, and clone operations familiar from Git. Data is stored in tables queryable via standard SQL (MySQL-compatible). Changes can be staged, committed, and pushed to remotes like DoltHub. Branches allow parallel development with merge capabilities including conflict resolution. Dolt enables use cases like data versioning, collaborative data editing, reproducible data pipelines, and auditable data changes with complete history.

How do I run a basic dolt example?

Run `dolt init` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does init do in dolt?

Initialize new repository.