LinuxCommandLibrary

hg-clone

creates a copy of a Mercurial repository

TLDR

Clone repository

$ hg clone [url]
copy
Clone to specific directory
$ hg clone [url] [directory]
copy
Clone specific branch
$ hg clone -b [branch] [url]
copy
Clone with specific revision
$ hg clone -r [revision] [url]
copy
Clone without working directory
$ hg clone -U [url]
copy

SYNOPSIS

hg clone [options] source [dest]

DESCRIPTION

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.

PARAMETERS

SOURCE

Repository URL or path.
DEST
Destination directory.
-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.

CAVEATS

Full history downloaded by default. Large repos take time. Network required for remote repos.

HISTORY

Clone is a core Mercurial command since version 1.0, providing distributed repository copying.

SEE ALSO

hg(1), hg-pull(1), hg-push(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community