LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

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.
-u, --updaterev REV
Check out the given revision, tag, or branch instead of the tip.
--pull
Use pull protocol to copy metadata.
--stream
Clone with minimal data processing (faster, but skips revlog delta reconstruction).
-e, --ssh CMD
Specify ssh command to use.
--insecure
Do not verify the server certificate.
--help
Display help information.

INSTALL

sudo apt install mercurial
copy
sudo dnf install mercurial
copy
sudo pacman -S mercurial
copy
sudo apk add mercurial
copy
sudo zypper install mercurial
copy
brew install mercurial
copy
nix profile install nixpkgs#mercurial
copy

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), hg-init(1)

RESOURCES

Copied to clipboard
Kai