1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-21 22:22:07 +02:00
tldr/pages/common/hg-clone.md
Lucas Gabriel Schneider a5fe31bc47
multiple pages: format technical tokens (#5119)
Co-authored-by: bl-ue <54780737+bl-ue@users.noreply.github.com>
Co-authored-by: Starbeamrainbowlabs <sbrl@starbeamrainbowlabs.com>
2021-01-31 12:05:18 -05:00

24 lines
821 B
Markdown

# hg clone
> Create a copy of an existing repository in a new directory.
> More information: <https://www.mercurial-scm.org/doc/hg.1.html#clone>.
- 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}}`