Updated libgit to version 2.46.2 based on Git for Windows sources
[TortoiseGit.git] / doc / source / en / TortoiseGit / git_doc / git-fetch-pack.xml
blobef7ddff93c3a92cf76424f2fdf6d127ed9a78429
1 <?xml version="1.0" encoding="UTF-8"?>\r
2 <!DOCTYPE sect2 SYSTEM "../../../dtd/dblite.dtd">\r
3 \r
4 <sect2 lang="en" id="git-fetch-pack(1)">\r
5     <title>git-fetch-pack(1)</title>\r
6     <date>2024-07-02</date>\r
7 <revhistory><revision><date>2024-07-02</date></revision></revhistory>\r
8 <indexterm>\r
9 <primary>git-fetch-pack(1)</primary>\r
10 </indexterm>\r
11 <simplesect id="git-fetch-pack(1)__name">\r
12 <title>NAME</title>\r
13 <simpara>git-fetch-pack - Receive missing objects from another repository</simpara>\r
14 </simplesect>\r
15 <simplesect id="git-fetch-pack(1)__synopsis">\r
16 <title>SYNOPSIS</title>\r
17 <blockquote>\r
18 <literallayout><emphasis>git fetch-pack</emphasis> [--all] [--quiet|-q] [--keep|-k] [--thin] [--include-tag]\r
19         [--upload-pack=&lt;git-upload-pack&gt;]\r
20         [--depth=&lt;n&gt;] [--no-progress]\r
21         [-v] &lt;repository&gt; [&lt;refs&gt;&#8230;]</literallayout>\r
22 </blockquote>\r
23 </simplesect>\r
24 <simplesect id="git-fetch-pack(1)__description">\r
25 <title>DESCRIPTION</title>\r
26 <simpara>Usually you would want to use <emphasis>git fetch</emphasis>, which is a\r
27 higher level wrapper of this command, instead.</simpara>\r
28 <simpara>Invokes <emphasis>git-upload-pack</emphasis> on a possibly remote repository\r
29 and asks it to send objects missing from this repository, to\r
30 update the named heads.  The list of commits available locally\r
31 is found out by scanning the local refs/ hierarchy and sent to\r
32 <emphasis>git-upload-pack</emphasis> running on the other end.</simpara>\r
33 <simpara>This command degenerates to download everything to complete the\r
34 asked refs from the remote side when the local side does not\r
35 have a common ancestor commit.</simpara>\r
36 </simplesect>\r
37 <simplesect id="git-fetch-pack(1)__options">\r
38 <title>OPTIONS</title>\r
39 <variablelist>\r
40 <varlistentry>\r
41 <term>\r
42 --all\r
43 </term>\r
44 <listitem>\r
45 <simpara>\r
46         Fetch all remote refs.\r
47 </simpara>\r
48 </listitem>\r
49 </varlistentry>\r
50 <varlistentry>\r
51 <term>\r
52 --stdin\r
53 </term>\r
54 <listitem>\r
55 <simpara>\r
56         Take the list of refs from stdin, one per line. If there\r
57         are refs specified on the command line in addition to this\r
58         option, then the refs from stdin are processed after those\r
59         on the command line.\r
60 </simpara>\r
61 <simpara>If <emphasis>--stateless-rpc</emphasis> is specified together with this option then\r
62 the list of refs must be in packet format (pkt-line). Each ref must\r
63 be in a separate packet, and the list must end with a flush packet.</simpara>\r
64 </listitem>\r
65 </varlistentry>\r
66 <varlistentry>\r
67 <term>\r
68 -q\r
69 </term>\r
70 <term>\r
71 --quiet\r
72 </term>\r
73 <listitem>\r
74 <simpara>\r
75         Pass <emphasis>-q</emphasis> flag to <emphasis>git unpack-objects</emphasis>; this makes the\r
76         cloning process less verbose.\r
77 </simpara>\r
78 </listitem>\r
79 </varlistentry>\r
80 <varlistentry>\r
81 <term>\r
82 -k\r
83 </term>\r
84 <term>\r
85 --keep\r
86 </term>\r
87 <listitem>\r
88 <simpara>\r
89         Do not invoke <emphasis>git unpack-objects</emphasis> on received data, but\r
90         create a single packfile out of it instead, and store it\r
91         in the object database. If provided twice then the pack is\r
92         locked against repacking.\r
93 </simpara>\r
94 </listitem>\r
95 </varlistentry>\r
96 <varlistentry>\r
97 <term>\r
98 --thin\r
99 </term>\r
100 <listitem>\r
101 <simpara>\r
102         Fetch a "thin" pack, which records objects in deltified form based\r
103         on objects not included in the pack to reduce network traffic.\r
104 </simpara>\r
105 </listitem>\r
106 </varlistentry>\r
107 <varlistentry>\r
108 <term>\r
109 --include-tag\r
110 </term>\r
111 <listitem>\r
112 <simpara>\r
113         If the remote side supports it, annotated tags objects will\r
114         be downloaded on the same connection as the other objects if\r
115         the object the tag references is downloaded.  The caller must\r
116         otherwise determine the tags this option made available.\r
117 </simpara>\r
118 </listitem>\r
119 </varlistentry>\r
120 <varlistentry>\r
121 <term>\r
122 --upload-pack=&lt;git-upload-pack&gt;\r
123 </term>\r
124 <listitem>\r
125 <simpara>\r
126         Use this to specify the path to <emphasis>git-upload-pack</emphasis> on the\r
127         remote side, if it is not found on your $PATH.\r
128         Installations of sshd ignores the user's environment\r
129         setup scripts for login shells (e.g. .bash_profile) and\r
130         your privately installed git may not be found on the system\r
131         default $PATH.  Another workaround suggested is to set\r
132         up your $PATH in ".bashrc", but this flag is for people\r
133         who do not want to pay the overhead for non-interactive\r
134         shells by having a lean .bashrc file (they set most of\r
135         the things up in .bash_profile).\r
136 </simpara>\r
137 </listitem>\r
138 </varlistentry>\r
139 <varlistentry>\r
140 <term>\r
141 --exec=&lt;git-upload-pack&gt;\r
142 </term>\r
143 <listitem>\r
144 <simpara>\r
145         Same as --upload-pack=&lt;git-upload-pack&gt;.\r
146 </simpara>\r
147 </listitem>\r
148 </varlistentry>\r
149 <varlistentry>\r
150 <term>\r
151 --depth=&lt;n&gt;\r
152 </term>\r
153 <listitem>\r
154 <simpara>\r
155         Limit fetching to ancestor-chains not longer than n.\r
156         <emphasis>git-upload-pack</emphasis> treats the special depth 2147483647 as\r
157         infinite even if there is an ancestor-chain that long.\r
158 </simpara>\r
159 </listitem>\r
160 </varlistentry>\r
161 <varlistentry>\r
162 <term>\r
163 --shallow-since=&lt;date&gt;\r
164 </term>\r
165 <listitem>\r
166 <simpara>\r
167         Deepen or shorten the history of a shallow repository to\r
168         include all reachable commits after &lt;date&gt;.\r
169 </simpara>\r
170 </listitem>\r
171 </varlistentry>\r
172 <varlistentry>\r
173 <term>\r
174 --shallow-exclude=&lt;revision&gt;\r
175 </term>\r
176 <listitem>\r
177 <simpara>\r
178         Deepen or shorten the history of a shallow repository to\r
179         exclude commits reachable from a specified remote branch or tag.\r
180         This option can be specified multiple times.\r
181 </simpara>\r
182 </listitem>\r
183 </varlistentry>\r
184 <varlistentry>\r
185 <term>\r
186 --deepen-relative\r
187 </term>\r
188 <listitem>\r
189 <simpara>\r
190         Argument --depth specifies the number of commits from the\r
191         current shallow boundary instead of from the tip of each\r
192         remote branch history.\r
193 </simpara>\r
194 </listitem>\r
195 </varlistentry>\r
196 <varlistentry>\r
197 <term>\r
198 --refetch\r
199 </term>\r
200 <listitem>\r
201 <simpara>\r
202         Skips negotiating commits with the server in order to fetch all matching\r
203         objects. Use to reapply a new partial clone blob/tree filter.\r
204 </simpara>\r
205 </listitem>\r
206 </varlistentry>\r
207 <varlistentry>\r
208 <term>\r
209 --no-progress\r
210 </term>\r
211 <listitem>\r
212 <simpara>\r
213         Do not show the progress.\r
214 </simpara>\r
215 </listitem>\r
216 </varlistentry>\r
217 <varlistentry>\r
218 <term>\r
219 --check-self-contained-and-connected\r
220 </term>\r
221 <listitem>\r
222 <simpara>\r
223         Output "connectivity-ok" if the received pack is\r
224         self-contained and connected.\r
225 </simpara>\r
226 </listitem>\r
227 </varlistentry>\r
228 <varlistentry>\r
229 <term>\r
230 -v\r
231 </term>\r
232 <listitem>\r
233 <simpara>\r
234         Run verbosely.\r
235 </simpara>\r
236 </listitem>\r
237 </varlistentry>\r
238 <varlistentry>\r
239 <term>\r
240 &lt;repository&gt;\r
241 </term>\r
242 <listitem>\r
243 <simpara>\r
244         The URL to the remote repository.\r
245 </simpara>\r
246 </listitem>\r
247 </varlistentry>\r
248 <varlistentry>\r
249 <term>\r
250 &lt;refs&gt;&#8230;\r
251 </term>\r
252 <listitem>\r
253 <simpara>\r
254         The remote heads to update from. This is relative to\r
255         $GIT_DIR (e.g. "HEAD", "refs/heads/master").  When\r
256         unspecified, update from all heads the remote side has.\r
257 </simpara>\r
258 <simpara>If the remote has enabled the options <emphasis>uploadpack.allowTipSHA1InWant</emphasis>,\r
259 <emphasis>uploadpack.allowReachableSHA1InWant</emphasis>, or <emphasis>uploadpack.allowAnySHA1InWant</emphasis>,\r
260 they may alternatively be 40-hex sha1s present on the remote.</simpara>\r
261 </listitem>\r
262 </varlistentry>\r
263 </variablelist>\r
264 </simplesect>\r
265 <simplesect id="git-fetch-pack(1)__see_also">\r
266 <title>SEE ALSO</title>\r
267 <simpara><xref linkend="git-fetch(1)" /></simpara>\r
268 </simplesect>\r
269 <simplesect id="git-fetch-pack(1)__git">\r
270 <title>GIT</title>\r
271 <simpara>Part of the <xref linkend="git(1)" /> suite</simpara>\r
272 </simplesect>\r
273 </sect2>\r