mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-08-12 22:15:43 +02:00
hg-clone: add page (#1806)
This commit is contained in:
commit
21d4d001d2
2 changed files with 24 additions and 1 deletions
23
pages/common/hg-clone.md
Normal file
23
pages/common/hg-clone.md
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
# hg clone
|
||||||
|
|
||||||
|
> Create a copy of an existing repository in a new directory.
|
||||||
|
|
||||||
|
- Clone a repository to a specified directory:
|
||||||
|
|
||||||
|
`hg clone {{remote_repository_source}} {{destination_path}}`
|
||||||
|
|
||||||
|
- Clone a repository to the head of a specific branch, ignoring later commits:
|
||||||
|
|
||||||
|
`hg clone --branch {{branch}} {{remote_repository_source}}`
|
||||||
|
|
||||||
|
- Clone a repository with only the ".hg" directory, without checking out files:
|
||||||
|
|
||||||
|
`hg clone --noupdate {{remote_repository_source}}`
|
||||||
|
|
||||||
|
- Clone a repository to a specific revision, tag or branch, keeping the entire history:
|
||||||
|
|
||||||
|
`hg clone --updaterev {{revision}} {{remote_repository_source}}`
|
||||||
|
|
||||||
|
- Clone a repository up to a specific revision without any newer history:
|
||||||
|
|
||||||
|
`hg clone --rev {{revision}} {{remote_repository_source}}`
|
|
@ -1,7 +1,7 @@
|
||||||
# hg
|
# hg
|
||||||
|
|
||||||
> A command line interface for Mercurial, a distributed source control management system.
|
> A command line interface for Mercurial, a distributed source control management system.
|
||||||
> See the `hg-add` and `hg-commit` pages for additional information.
|
> See `hg-add`, `hg-commit` and other pages for additional information.
|
||||||
|
|
||||||
- Execute Mercurial command:
|
- Execute Mercurial command:
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue