Linux command
dolt-clone 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Clone from DoltHub
dolt clone [owner/repo]
Clone to specific
dolt clone [owner/repo] [directory]
Clone with specific
dolt clone --remote [name] [owner/repo]
Clone specific branch
dolt clone -b [branch] [owner/repo]
Shallow clone
dolt clone --depth [1] [owner/repo]
Clone a private
dolt clone --user [username] [owner/repo]
说明
dolt clone creates a local copy of a remote Dolt repository. It downloads the database including all tables, commit history, and branches from DoltHub or other Dolt remotes. The cloned repository maintains a connection to its origin, enabling push and pull operations. By default, all branches are fetched, though single-branch cloning is available for efficiency. This is typically the first step in collaborating on a Dolt database, bringing a shared dataset to your local environment for querying and modification.
参数
- -b, --branch _BRANCH_
- Clone specific branch.
- --remote _NAME_
- Name for the remote (default: origin).
- --depth _N_
- Perform a shallow clone with history limited to N commits.
- --single-branch
- Clone only one branch.
- --user _USERNAME_
- User name for authentication with the remote. Password is read from the DOLT_REMOTE_PASSWORD environment variable.
- --help
- Display help information.
FAQ
What is the dolt-clone command used for?
dolt clone creates a local copy of a remote Dolt repository. It downloads the database including all tables, commit history, and branches from DoltHub or other Dolt remotes. The cloned repository maintains a connection to its origin, enabling push and pull operations. By default, all branches are fetched, though single-branch cloning is available for efficiency. This is typically the first step in collaborating on a Dolt database, bringing a shared dataset to your local environment for querying and modification.
How do I run a basic dolt-clone example?
Run `dolt clone [owner/repo]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -b, --branch _BRANCH_ do in dolt-clone?
Clone specific branch.