Skip to content

Commit 0dd1b01

Browse files
committed
docs: update git-clone doc: refer to long options
To make the doc of git-clone easier to read, refer to the long version of the options (it is easier to guess what --verbose is doing than -v). Also: put the short options first, to match the doc of git-add, git-commit, git-clean, git-branch... Signed-off-by: Quentin Nerden <[email protected]>
1 parent 8dca754 commit 0dd1b01

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

Documentation/git-clone.txt

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ configuration variables.
4141

4242
OPTIONS
4343
-------
44-
--local::
4544
-l::
45+
--local::
4646
When the repository to clone from is on a local machine,
4747
this flag bypasses the normal "Git aware" transport
4848
mechanism and clones the repository by making a copy of
@@ -63,8 +63,8 @@ Git transport instead.
6363
directory instead of using hardlinks. This may be desirable
6464
if you are trying to make a back-up of your repository.
6565

66-
--shared::
6766
-s::
67+
--shared::
6868
When the repository to clone is on the local machine,
6969
instead of using hard links, automatically setup
7070
`.git/objects/info/alternates` to share the objects
@@ -81,10 +81,10 @@ which automatically call `git gc --auto`. (See linkgit:git-gc[1].)
8181
If these objects are removed and were referenced by the cloned repository,
8282
then the cloned repository will become corrupt.
8383
+
84-
Note that running `git repack` without the `-l` option in a repository
84+
Note that running `git repack` without the `--local` option in a repository
8585
cloned with `-s` will copy objects from the source repository into a pack
8686
in the cloned repository, removing the disk space savings of `clone -s`.
87-
It is safe, however, to run `git gc`, which uses the `-l` option by
87+
It is safe, however, to run `git gc`, which uses the `--local` option by
8888
default.
8989
+
9090
If you want to break the dependency of a repository cloned with `-s` on
@@ -116,19 +116,19 @@ objects from the source repository into a pack in the cloned repository.
116116
same repository, and this option can be used to stop the
117117
borrowing.
118118

119-
--quiet::
120119
-q::
120+
--quiet::
121121
Operate quietly. Progress is not reported to the standard
122122
error stream.
123123

124-
--verbose::
125124
-v::
125+
--verbose::
126126
Run verbosely. Does not affect the reporting of progress status
127127
to the standard error stream.
128128

129129
--progress::
130130
Progress status is reported on the standard error stream
131-
by default when it is attached to a terminal, unless -q
131+
by default when it is attached to a terminal, unless `--quiet`
132132
is specified. This flag forces progress status even if the
133133
standard error stream is not directed to a terminal.
134134

@@ -140,15 +140,15 @@ objects from the source repository into a pack in the cloned repository.
140140
When multiple `--server-option=<option>` are given, they are all
141141
sent to the other side in the order listed on the command line.
142142

143-
--no-checkout::
144143
-n::
144+
--no-checkout::
145145
No checkout of HEAD is performed after the clone is complete.
146146

147147
--bare::
148148
Make a 'bare' Git repository. That is, instead of
149149
creating `<directory>` and placing the administrative
150150
files in `<directory>/.git`, make the `<directory>`
151-
itself the `$GIT_DIR`. This obviously implies the `-n`
151+
itself the `$GIT_DIR`. This obviously implies `--no-checkout`
152152
because there is nowhere to check out the working tree.
153153
Also the branch heads at the remote are copied directly
154154
to corresponding local branch heads, without mapping
@@ -164,22 +164,22 @@ objects from the source repository into a pack in the cloned repository.
164164
that all these refs are overwritten by a `git remote update` in the
165165
target repository.
166166

167-
--origin <name>::
168167
-o <name>::
168+
--origin <name>::
169169
Instead of using the remote name `origin` to keep track
170170
of the upstream repository, use `<name>`.
171171

172-
--branch <name>::
173172
-b <name>::
173+
--branch <name>::
174174
Instead of pointing the newly created HEAD to the branch pointed
175175
to by the cloned repository's HEAD, point to `<name>` branch
176176
instead. In a non-bare repository, this is the branch that will
177177
be checked out.
178178
`--branch` can also take tags and detaches the HEAD at that commit
179179
in the resulting repository.
180180

181-
--upload-pack <upload-pack>::
182181
-u <upload-pack>::
182+
--upload-pack <upload-pack>::
183183
When given, and the repository to clone from is accessed
184184
via ssh, this specifies a non-default path for the command
185185
run on the other end.
@@ -188,8 +188,8 @@ objects from the source repository into a pack in the cloned repository.
188188
Specify the directory from which templates will be used;
189189
(See the "TEMPLATE DIRECTORY" section of linkgit:git-init[1].)
190190

191-
--config <key>=<value>::
192191
-c <key>=<value>::
192+
--config <key>=<value>::
193193
Set a configuration variable in the newly-created repository;
194194
this takes effect immediately after the repository is
195195
initialized, but before the remote history is fetched or any
@@ -274,8 +274,8 @@ or `--mirror` is given)
274274
The result is Git repository can be separated from working
275275
tree.
276276

277-
-j <n>::
278277
--jobs <n>::
278+
-j <n>::
279279
The number of submodules fetched at the same time.
280280
Defaults to the `submodule.fetchJobs` option.
281281

0 commit comments

Comments
 (0)