git-clone: update page (#10315)

* git-clone: add clone .git only example

* git-clone: update page

Make remaining options long for better consistency, wrap .git with backticks

* git-clone: update page

Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com>

* Update pages/common/git-clone.md

Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com>

---------

Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com>
pull/23/head
Zhizhen He 2023-06-04 22:28:31 +08:00 committed by GitHub
parent e4fdca68c5
commit 9caabee0fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 7 deletions

View File

@ -3,11 +3,7 @@
> Clone an existing repository.
> More information: <https://git-scm.com/docs/git-clone>.
- Clone an existing repository:
`git clone {{remote_repository_location}}`
- Clone an existing repository into a specific directory:
- Clone an existing repository into a new directory (the default directory is the repository name):
`git clone {{remote_repository_location}} {{path/to/directory}}`
@ -15,13 +11,17 @@
`git clone --recursive {{remote_repository_location}}`
- Clone only the `.git` directory of an existing repository:
`git clone --no-checkout {{remote_repository_location}}`
- Clone a local repository:
`git clone -l {{path/to/local/repository}}`
`git clone --local {{path/to/local/repository}}`
- Clone quietly:
`git clone -q {{remote_repository_location}}`
`git clone --quiet {{remote_repository_location}}`
- Clone an existing repository only fetching the 10 most recent commits on the default branch (useful to save time):