tldr/pages/common/git-clone.md

25 lines
604 B
Markdown
Raw Normal View History

2015-10-22 08:31:52 +01:00
# git clone
2014-03-09 12:20:13 +00:00
> Clone an existing repository.
> More information: <https://git-scm.com/docs/git-clone>.
2014-03-09 12:20:13 +00:00
- Clone an existing repository:
2014-03-09 12:20:13 +00:00
`git clone {{remote_repository_location}}`
2014-03-09 12:20:13 +00:00
- Clone an existing repository and its submodules:
`git clone --recursive {{remote_repository_location}}`
- Clone a local repository:
2014-03-09 12:20:13 +00:00
`git clone -l {{path/to/local/repository}}`
2014-03-09 12:20:13 +00:00
- Clone quietly:
2014-03-09 12:20:13 +00:00
`git clone -q {{remote_repository_location}}`
- Clone an existing repository only fetching the 10 most recent commits on the default branch (useful to save time):
2017-12-29 06:02:01 +00:00
`git clone --depth {{10}} {{remote_repository_location}}`