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