1 <?xml version="1.0" encoding="UTF-8"?>
\r
2 <!DOCTYPE sect2 SYSTEM "../../../dtd/dblite.dtd">
\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
9 <primary>git-fetch-pack(1)</primary>
\r
11 <simplesect id="git-fetch-pack(1)__name">
\r
13 <simpara>git-fetch-pack - Receive missing objects from another repository</simpara>
\r
15 <simplesect id="git-fetch-pack(1)__synopsis">
\r
16 <title>SYNOPSIS</title>
\r
18 <literallayout><emphasis>git fetch-pack</emphasis> [--all] [--quiet|-q] [--keep|-k] [--thin] [--include-tag]
\r
19 [--upload-pack=<git-upload-pack>]
\r
20 [--depth=<n>] [--no-progress]
\r
21 [-v] <repository> [<refs>…]</literallayout>
\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
37 <simplesect id="git-fetch-pack(1)__options">
\r
38 <title>OPTIONS</title>
\r
46 Fetch all remote refs.
\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
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
75 Pass <emphasis>-q</emphasis> flag to <emphasis>git unpack-objects</emphasis>; this makes the
\r
76 cloning process less verbose.
\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
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
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
122 --upload-pack=<git-upload-pack>
\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
141 --exec=<git-upload-pack>
\r
145 Same as --upload-pack=<git-upload-pack>.
\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
163 --shallow-since=<date>
\r
167 Deepen or shorten the history of a shallow repository to
\r
168 include all reachable commits after <date>.
\r
174 --shallow-exclude=<revision>
\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
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
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
213 Do not show the progress.
\r
219 --check-self-contained-and-connected
\r
223 Output "connectivity-ok" if the received pack is
\r
224 self-contained and connected.
\r
244 The URL to the remote repository.
\r
250 <refs>…
\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
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
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
269 <simplesect id="git-fetch-pack(1)__git">
\r
271 <simpara>Part of the <xref linkend="git(1)" /> suite</simpara>
\r