Linux command
hg-clone 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Clone repository
hg clone [url]
Clone to specific directory
hg clone [url] [directory]
Clone specific branch
hg clone -b [branch] [url]
Clone with specific revision
hg clone -r [revision] [url]
Clone without working directory
hg clone -U [url]
说明
hg clone creates a copy of a Mercurial repository. It downloads the entire history and creates a working directory. The command supports various protocols including SSH, HTTP, and local paths. It can clone specific branches or revisions.
参数
- -b, --branch _BRANCH_
- Clone specific branch.
- -r, --rev _REV_
- Clone up to revision.
- -U, --noupdate
- Clone without working directory.
- --pull
- Use pull protocol.
- --help
- Display help information.
FAQ
What is the hg-clone command used for?
hg clone creates a copy of a Mercurial repository. It downloads the entire history and creates a working directory. The command supports various protocols including SSH, HTTP, and local paths. It can clone specific branches or revisions.
How do I run a basic hg-clone example?
Run `hg clone [url]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -b, --branch _BRANCH_ do in hg-clone?
Clone specific branch.