@@ -8,16 +8,16 @@ git-clone - Clone a repository into a new directory
8
8
9
9
SYNOPSIS
10
10
--------
11
- [verse ]
12
- ` git clone` [++ --template=++__ <template-directory>__ ]
13
- [`-l` ] [`-s` ] [` --no-hardlinks` ] [`-q` ] [`-n` ] [` --bare` ] [` --mirror` ]
14
- [`-o` _ <name>_ ] [`-b` _ <name>_ ] [`-u` _ <upload-pack>_ ] [` --reference` _ <repository>_ ]
15
- [` --dissociate` ] [` --separate-git-dir` _ <git-dir>_ ]
16
- [` --depth` _ <depth>_ ] [`--`[` no-`]{empty}` single-branch` ] [` --no-tags` ]
17
- [++ --recurse-submodules++[++=++__ <pathspec>__ ]] [++--++[++ no-++]{empty}++ shallow-submodules++ ]
18
- [`--`[` no-`]{empty}` remote-submodules` ] [` --jobs` _ <n>_ ] [` --sparse` ] [`--`[` no-`]{empty}` reject-shallow` ]
19
- [++ --filter=++__ <filter-spec>__ ] [` --also-filter-submodules` ]] [`--`] _ <repository>_
20
- [_ <directory>_ ]
11
+ [synopsis ]
12
+ git clone [ --template=<template-directory>]
13
+ [-l ] [-s ] [--no-hardlinks] [-q ] [-n ] [--bare] [--mirror]
14
+ [-o <name>] [-b <name>] [-u <upload-pack>] [--reference <repository>]
15
+ [--dissociate] [--separate-git-dir <git-dir>]
16
+ [--depth <depth>] [--[ no-] single-branch] [--no-tags]
17
+ [--recurse-submodules[= <pathspec>]] [--[ no-] shallow-submodules]
18
+ [--[ no-] remote-submodules] [--jobs <n>] [--sparse] [--[ no-] reject-shallow]
19
+ [--filter=<filter-spec>] [--also-filter-submodules]] [--] <repository>
20
+ [<directory>]
21
21
22
22
DESCRIPTION
23
23
-----------
@@ -52,7 +52,7 @@ OPTIONS
52
52
to save space when possible.
53
53
+
54
54
If the repository is specified as a local path (e.g., `/path/to/repo`),
55
- this is the default, and --local is essentially a no-op. If the
55
+ this is the default, and ` --local` is essentially a no-op. If the
56
56
repository is specified as a URL, then this flag is ignored (and we
57
57
never use the local optimizations). Specifying `--no-local` will
58
58
override the default when `/path/to/repo` is given, using the regular
@@ -64,8 +64,8 @@ prevent the unintentional copying of files by dereferencing the symbolic
64
64
links.
65
65
+
66
66
*NOTE*: this operation can race with concurrent modification to the
67
- source repository, similar to running `cp -r src dst` while modifying
68
- ` src` .
67
+ source repository, similar to running `cp -r < src> < dst> ` while modifying
68
+ _< src>_ .
69
69
70
70
`--no-hardlinks`::
71
71
Force the cloning process from a repository on a local
@@ -101,7 +101,7 @@ If you want to break the dependency of a repository cloned with `--shared` on
101
101
its source repository, you can simply run `git repack -a` to copy all
102
102
objects from the source repository into a pack in the cloned repository.
103
103
104
- `--reference`[` -if-able`] _ <repository>_ ::
104
+ `--reference[ -if-able] <repository>` ::
105
105
If the reference _<repository>_ is on the local machine,
106
106
automatically setup `.git/objects/info/alternates` to
107
107
obtain objects from the reference _<repository>_. Using
@@ -142,17 +142,17 @@ objects from the source repository into a pack in the cloned repository.
142
142
is specified. This flag forces progress status even if the
143
143
standard error stream is not directed to a terminal.
144
144
145
- ++ --server-option=++__ <option>__ ::
145
+ ` --server-option=<option>` ::
146
146
Transmit the given string to the server when communicating using
147
147
protocol version 2. The given string must not contain a NUL or LF
148
148
character. The server's handling of server options, including
149
149
unknown ones, is server-specific.
150
- When multiple ++ --server-option=++__ <option>__ are given, they are all
150
+ When multiple ` --server-option=<option>` are given, they are all
151
151
sent to the other side in the order listed on the command line.
152
152
153
153
`-n`::
154
154
`--no-checkout`::
155
- No checkout of HEAD is performed after the clone is complete.
155
+ No checkout of ` HEAD` is performed after the clone is complete.
156
156
157
157
`--`[`no-`]`reject-shallow`::
158
158
Fail if the source repository is a shallow repository.
@@ -162,7 +162,7 @@ objects from the source repository into a pack in the cloned repository.
162
162
`--bare`::
163
163
Make a 'bare' Git repository. That is, instead of
164
164
creating _<directory>_ and placing the administrative
165
- files in _ <directory>_` /.git`, make the _<directory>_
165
+ files in ` <directory>/.git`, make the _<directory>_
166
166
itself the `$GIT_DIR`. This obviously implies the `--no-checkout`
167
167
because there is nowhere to check out the working tree.
168
168
Also the branch heads at the remote are copied directly
@@ -177,13 +177,13 @@ objects from the source repository into a pack in the cloned repository.
177
177
linkgit:git-sparse-checkout[1] command can be used to grow the
178
178
working directory as needed.
179
179
180
- ++ --filter=++__ <filter-spec>__ ::
180
+ ` --filter=<filter-spec>` ::
181
181
Use the partial clone feature and request that the server sends
182
182
a subset of reachable objects according to a given object filter.
183
183
When using `--filter`, the supplied _<filter-spec>_ is used for
184
184
the partial clone filter. For example, `--filter=blob:none` will
185
185
filter out all blobs (file contents) until needed by Git. Also,
186
- ++ --filter=blob:limit=++__ <size>__ will filter out all blobs of size
186
+ ` --filter=blob:limit=<size>` will filter out all blobs of size
187
187
at least _<size>_. For more details on filter specifications, see
188
188
the `--filter` option in linkgit:git-rev-list[1].
189
189
@@ -208,11 +208,11 @@ objects from the source repository into a pack in the cloned repository.
208
208
209
209
`-b` _<name>_::
210
210
`--branch` _<name>_::
211
- Instead of pointing the newly created HEAD to the branch pointed
212
- to by the cloned repository's HEAD, point to _<name>_ branch
211
+ Instead of pointing the newly created ` HEAD` to the branch pointed
212
+ to by the cloned repository's ` HEAD` , point to _<name>_ branch
213
213
instead. In a non-bare repository, this is the branch that will
214
214
be checked out.
215
- `--branch` can also take tags and detaches the HEAD at that commit
215
+ `--branch` can also take tags and detaches the ` HEAD` at that commit
216
216
in the resulting repository.
217
217
218
218
`-u` _<upload-pack>_::
@@ -221,12 +221,12 @@ objects from the source repository into a pack in the cloned repository.
221
221
via ssh, this specifies a non-default path for the command
222
222
run on the other end.
223
223
224
- ++ --template=++__ <template-directory>__ ::
224
+ ` --template=<template-directory>` ::
225
225
Specify the directory from which templates will be used;
226
226
(See the "TEMPLATE DIRECTORY" section of linkgit:git-init[1].)
227
227
228
- `-c` __ <key>__++=++__ <value>__ ::
229
- `--config` __ <key>__++=++__ <value>__ ::
228
+ `-c` ` <key>= <value>` ::
229
+ `--config` ` <key>= <value>` ::
230
230
Set a configuration variable in the newly-created repository;
231
231
this takes effect immediately after the repository is
232
232
initialized, but before the remote history is fetched or any
@@ -239,25 +239,25 @@ objects from the source repository into a pack in the cloned repository.
239
239
Due to limitations of the current implementation, some configuration
240
240
variables do not take effect until after the initial fetch and checkout.
241
241
Configuration variables known to not take effect are:
242
- ++ remote.++__ <name>__++ .mirror++ and ++ remote.++__ <name>__++ .tagOpt++ . Use the
242
+ ` remote.<name>.mirror` and ` remote.<name>.tagOpt` . Use the
243
243
corresponding `--mirror` and `--no-tags` options instead.
244
244
245
- `--depth` _ <depth>_ ::
245
+ `--depth <depth>` ::
246
246
Create a 'shallow' clone with a history truncated to the
247
247
specified number of commits. Implies `--single-branch` unless
248
248
`--no-single-branch` is given to fetch the histories near the
249
249
tips of all branches. If you want to clone submodules shallowly,
250
250
also pass `--shallow-submodules`.
251
251
252
- ++ --shallow-since=++__ <date>__ ::
252
+ ` --shallow-since=<date>` ::
253
253
Create a shallow clone with a history after the specified time.
254
254
255
- ++ --shallow-exclude=++__ <revision>__ ::
255
+ ` --shallow-exclude=<revision>` ::
256
256
Create a shallow clone with a history, excluding commits
257
257
reachable from a specified remote branch or tag. This option
258
258
can be specified multiple times.
259
259
260
- `--`[` no-`]` single-branch`::
260
+ `--[ no-] single-branch`::
261
261
Clone only the history leading to the tip of a single branch,
262
262
either specified by the `--branch` option or the primary
263
263
branch remote's `HEAD` points at.
@@ -279,13 +279,13 @@ maintain a branch with no references other than a single cloned
279
279
branch. This is useful e.g. to maintain minimal clones of the default
280
280
branch of some repository for search indexing.
281
281
282
- `--recurse-submodules`[`=`{empty}__ <pathspec>__] ::
282
+ `--recurse-submodules[= <pathspec>]` ::
283
283
After the clone is created, initialize and clone submodules
284
- within based on the provided _<pathspec>_. If no _ =<pathspec>_ is
284
+ within based on the provided _<pathspec>_. If no ` =<pathspec>` is
285
285
provided, all submodules are initialized and cloned.
286
286
This option can be given multiple times for pathspecs consisting
287
287
of multiple entries. The resulting clone has `submodule.active` set to
288
- the provided pathspec, or ". " (meaning all submodules) if no
288
+ the provided pathspec, or "`.` " (meaning all submodules) if no
289
289
pathspec is provided.
290
290
+
291
291
Submodules are initialized and cloned using their default settings. This is
@@ -295,23 +295,23 @@ the clone is finished. This option is ignored if the cloned repository does
295
295
not have a worktree/checkout (i.e. if any of `--no-checkout`/`-n`, `--bare`,
296
296
or `--mirror` is given)
297
297
298
- `--`[` no-`]` shallow-submodules`::
298
+ `--[ no-] shallow-submodules`::
299
299
All submodules which are cloned will be shallow with a depth of 1.
300
300
301
- `--`[` no-`]` remote-submodules`::
301
+ `--[ no-] remote-submodules`::
302
302
All submodules which are cloned will use the status of the submodule's
303
303
remote-tracking branch to update the submodule, rather than the
304
304
superproject's recorded SHA-1. Equivalent to passing `--remote` to
305
305
`git submodule update`.
306
306
307
- `--separate-git-dir=`{empty}__ <git-dir>__ ::
307
+ `--separate-git-dir=<git-dir>` ::
308
308
Instead of placing the cloned repository where it is supposed
309
309
to be, place the cloned repository at the specified directory,
310
310
then make a filesystem-agnostic Git symbolic link to there.
311
311
The result is Git repository can be separated from working
312
312
tree.
313
313
314
- `--ref-format=`{empty}__ <ref-format>__ ::
314
+ `--ref-format=<ref-format>` ::
315
315
316
316
Specify the given ref storage format for the repository. The valid values are:
317
317
+
@@ -334,7 +334,7 @@ _<directory>_::
334
334
for `host.xz:foo/.git`). Cloning into an existing directory
335
335
is only allowed if the directory is empty.
336
336
337
- `--bundle-uri=`{empty}__ <uri>__ ::
337
+ `--bundle-uri=<uri>` ::
338
338
Before fetching from the remote, fetch a bundle from the given
339
339
_<uri>_ and unbundle the data into the local repository. The refs
340
340
in the bundle will be stored under the hidden `refs/bundle/*`
0 commit comments