upload-pack: add get_reachable_list()
[git/git.git] / Documentation / fetch-options.txt
CommitLineData
9c4a036b
BG
1--all::
2 Fetch all remotes.
3
3240240f
SB
4-a::
5--append::
93d69d86
JL
6 Append ref names and object names of fetched refs to the
7 existing contents of `.git/FETCH_HEAD`. Without this
8 option old data in `.git/FETCH_HEAD` will be overwritten.
9
6b276e19 10--depth=<depth>::
60253a60
SS
11 Limit fetching to the specified number of commits from the tip of
12 each remote branch history. If fetching to a 'shallow' repository
13 created by `git clone` with `--depth=<depth>` option (see
14 linkgit:git-clone[1]), deepen or shorten the history to the specified
15 number of commits. Tags for the deepened commits are not fetched.
2c620a1a 16
508ea882
NTND
17--shallow-since=<date>::
18 Deepen or shorten the history of a shallow repository to
19 include all reachable commits after <date>.
20
a45a2600
NTND
21--shallow-exclude=<revision>::
22 Deepen or shorten the history of a shallow repository to
23 exclude commits reachable from a specified remote branch or tag.
24 This option can be specified multiple times.
25
4dcb167f 26--unshallow::
79d3a236
NTND
27 If the source repository is complete, convert a shallow
28 repository to a complete one, removing all the limitations
29 imposed by shallow repositories.
30+
31If the source repository is shallow, fetch as much as possible so that
32the current repository has the same history as the source repository.
4dcb167f 33
48d25cae
NTND
34--update-shallow::
35 By default when fetching from a shallow repository,
36 `git fetch` refuses refs that require updating
37 .git/shallow. This option updates .git/shallow and accept such
38 refs.
4dcb167f 39
28a15401
JS
40ifndef::git-pull[]
41--dry-run::
42 Show what would be done, without making any changes.
43endif::git-pull[]
44
3240240f
SB
45-f::
46--force::
0b444cdb 47 When 'git fetch' is used with `<rbranch>:<lbranch>`
a3e3dc46
JH
48 refspec, it refuses to update the local branch
49 `<lbranch>` unless the remote branch `<rbranch>` it
50 fetches is a descendant of `<lbranch>`. This option
51 overrides that check.
93d69d86 52
6b276e19
JA
53-k::
54--keep::
55 Keep downloaded pack.
56
16679e37
BG
57ifndef::git-pull[]
58--multiple::
59 Allow several <repository> and <group> arguments to be
60 specified. No <refspec>s may be specified.
f360d844 61
1b79d1c2 62-p::
f360d844 63--prune::
0838bf47
MH
64 After fetching, remove any remote-tracking references that no
65 longer exist on the remote. Tags are not subject to pruning
66 if they are fetched only because of the default tag
67 auto-following or due to a --tags option. However, if tags
68 are fetched due to an explicit refspec (either on the command
69 line or in the remote configuration, for example if the remote
70 was cloned with the --mirror option), then they are also
71 subject to pruning.
16679e37
BG
72endif::git-pull[]
73
10eb64f5 74ifndef::git-pull[]
3240240f 75-n::
10eb64f5 76endif::git-pull[]
01ca90c2 77--no-tags::
10eb64f5
MV
78 By default, tags that point at objects that are downloaded
79 from the remote repository are fetched and stored locally.
ed368546 80 This option disables this automatic tag following. The default
da0005b8 81 behavior for a remote may be specified with the remote.<name>.tagOpt
ed368546 82 setting. See linkgit:git-config[1].
03febf99 83
2e5955f3 84ifndef::git-pull[]
c5558f80
JH
85--refmap=<refspec>::
86 When fetching refs listed on the command line, use the
87 specified refspec (can be given more than once) to map the
88 refs to remote-tracking branches, instead of the values of
89 `remote.*.fetch` configuration variables for the remote
90 repository. See section on "Configured Remote-tracking
91 Branches" for details.
92
3240240f
SB
93-t::
94--tags::
0838bf47
MH
95 Fetch all tags from the remote (i.e., fetch remote tags
96 `refs/tags/*` into local tags with the same name), in addition
97 to whatever else would otherwise be fetched. Using this
98 option alone does not subject tags to pruning, even if --prune
99 is used (though tags may be pruned anyway if they are also the
100 destination of an explicit refspec; see '--prune').
93d69d86 101
8f0700dd
JL
102--recurse-submodules[=yes|on-demand|no]::
103 This option controls if and under what conditions new commits of
104 populated submodules should be fetched too. It can be used as a
105 boolean option to completely disable recursion when set to 'no' or to
106 unconditionally recurse into all populated submodules when set to
107 'yes', which is the default when this option is used without any
108 value. Use 'on-demand' to only recurse into a populated submodule
109 when the superproject retrieves a commit that updates the submodule's
c16c3e40
JL
110 reference to a commit that isn't already in the local submodule
111 clone.
8f0700dd 112
62104ba1
SB
113-j::
114--jobs=<n>::
115 Number of parallel children to be used for fetching submodules.
116 Each will fetch from different submodules, such that fetching many
117 submodules will be faster. By default submodules will be fetched
118 one at a time.
119
8f0700dd
JL
120--no-recurse-submodules::
121 Disable recursive fetching of submodules (this has the same effect as
122 using the '--recurse-submodules=no' option).
7dce19d3 123
7dce19d3
JL
124--submodule-prefix=<path>::
125 Prepend <path> to paths printed in informative messages
126 such as "Fetching submodule foo". This option is used
127 internally when recursing over submodules.
88a21979
JL
128
129--recurse-submodules-default=[yes|on-demand]::
130 This option is used internally to temporarily provide a
131 non-negative default value for the --recurse-submodules
132 option. All other methods of configuring fetch's submodule
133 recursion (such as settings in linkgit:gitmodules[5] and
134 linkgit:git-config[1]) override this option, as does
135 specifying --[no-]recurse-submodules directly.
7dce19d3 136endif::git-pull[]
93d69d86 137
3240240f
SB
138-u::
139--update-head-ok::
0b444cdb 140 By default 'git fetch' refuses to update the head which
93d69d86 141 corresponds to the current branch. This flag disables the
0b444cdb
TR
142 check. This is purely for the internal use for 'git pull'
143 to communicate with 'git fetch', and unless you are
a597fb0e
JH
144 implementing your own Porcelain you are not supposed to
145 use it.
03febf99 146
6b276e19
JA
147--upload-pack <upload-pack>::
148 When given, and the repository to fetch from is handled
0b444cdb 149 by 'git fetch-pack', '--exec=<upload-pack>' is passed to
6b276e19
JA
150 the command to specify non-default path for the command
151 run on the other end.
152
153ifndef::git-pull[]
154-q::
155--quiet::
156 Pass --quiet to git-fetch-pack and silence any other internally
9839018e
TRC
157 used git commands. Progress is not reported to the standard error
158 stream.
6b276e19
JA
159
160-v::
161--verbose::
162 Be verbose.
163endif::git-pull[]
9839018e
TRC
164
165--progress::
166 Progress status is reported on the standard error stream
167 by default when it is attached to a terminal, unless -q
168 is specified. This flag forces progress status even if the
169 standard error stream is not directed to a terminal.