Skip to content

Commit 1cf76b7

Browse files
committed
Merge branch 'qn/clone-doc-use-long-form' into maint
The "git clone" documentation refers to command line options in its description in the short form; they have been replaced with long forms to make them more recognisable. * qn/clone-doc-use-long-form: docs: git-clone: list short form of options first docs: git-clone: refer to long form of options
2 parents 9c65991 + bfc8c84 commit 1cf76b7

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

Documentation/git-clone.txt

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ DESCRIPTION
2222

2323
Clones a repository into a newly created directory, creates
2424
remote-tracking branches for each branch in the cloned repository
25-
(visible using `git branch -r`), and creates and checks out an
25+
(visible using `git branch --remotes`), and creates and checks out an
2626
initial branch that is forked from the cloned repository's
2727
currently active branch.
2828

@@ -40,8 +40,8 @@ configuration variables.
4040

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

65-
--shared::
6665
-s::
66+
--shared::
6767
When the repository to clone is on the local machine,
6868
instead of using hard links, automatically setup
6969
`.git/objects/info/alternates` to share the objects
@@ -80,13 +80,13 @@ which automatically call `git gc --auto`. (See linkgit:git-gc[1].)
8080
If these objects are removed and were referenced by the cloned repository,
8181
then the cloned repository will become corrupt.
8282
+
83-
Note that running `git repack` without the `-l` option in a repository
84-
cloned with `-s` will copy objects from the source repository into a pack
85-
in the cloned repository, removing the disk space savings of `clone -s`.
86-
It is safe, however, to run `git gc`, which uses the `-l` option by
83+
Note that running `git repack` without the `--local` option in a repository
84+
cloned with `--shared` will copy objects from the source repository into a pack
85+
in the cloned repository, removing the disk space savings of `clone --shared`.
86+
It is safe, however, to run `git gc`, which uses the `--local` option by
8787
default.
8888
+
89-
If you want to break the dependency of a repository cloned with `-s` on
89+
If you want to break the dependency of a repository cloned with `--shared` on
9090
its source repository, you can simply run `git repack -a` to copy all
9191
objects from the source repository into a pack in the cloned repository.
9292

@@ -115,19 +115,19 @@ objects from the source repository into a pack in the cloned repository.
115115
same repository, and this option can be used to stop the
116116
borrowing.
117117

118-
--quiet::
119118
-q::
119+
--quiet::
120120
Operate quietly. Progress is not reported to the standard
121121
error stream.
122122

123-
--verbose::
124123
-v::
124+
--verbose::
125125
Run verbosely. Does not affect the reporting of progress status
126126
to the standard error stream.
127127

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

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

142-
--no-checkout::
143142
-n::
143+
--no-checkout::
144144
No checkout of HEAD is performed after the clone is complete.
145145

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

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

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

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

190-
--config <key>=<value>::
191190
-c <key>=<value>::
191+
--config <key>=<value>::
192192
Set a configuration variable in the newly-created repository;
193193
this takes effect immediately after the repository is
194194
initialized, but before the remote history is fetched or any

0 commit comments

Comments
 (0)