blob: b3467664d30bde111af06ec0e915e6def2b1b4b2 [file] [log] [blame]
Junio C Hamano1a4e8412005-12-27 08:17:231git-fetch-pack(1)
2=================
3
4NAME
5----
Junio C Hamano01078922006-03-10 00:31:476git-fetch-pack - Receive missing objects from another repository
Junio C Hamano1a4e8412005-12-27 08:17:237
8
9SYNOPSIS
10--------
Junio C Hamano15567bc2011-07-23 00:51:5911[verse]
Junio C Hamanof2b74942012-11-20 21:06:2612'git fetch-pack' [--all] [--quiet|-q] [--keep|-k] [--thin] [--include-tag]
Junio C Hamano3d1b5a12013-05-17 23:34:0213[--upload-pack=<git-upload-pack>]
14[--depth=<n>] [--no-progress]
Junio C Hamanob73af6c2013-12-03 22:07:1115[-v] <repository> [<refs>...]
Junio C Hamano1a4e8412005-12-27 08:17:2316
17DESCRIPTION
18-----------
Junio C Hamano1aa40d22010-01-21 17:46:4319Usually you would want to use 'git fetch', which is a
Junio C Hamanofce7c7e2008-07-02 03:06:3820higher level wrapper of this command, instead.
Junio C Hamanoe58607f2007-01-17 23:27:4521
Junio C Hamanoba4b9282008-07-06 05:20:3122Invokes 'git-upload-pack' on a possibly remote repository
Junio C Hamano1a4e8412005-12-27 08:17:2323and asks it to send objects missing from this repository, to
24update the named heads. The list of commits available locally
Junio C Hamano4fdccb22010-02-19 09:58:1425is found out by scanning the local refs/ hierarchy and sent to
Junio C Hamanoba4b9282008-07-06 05:20:3126'git-upload-pack' running on the other end.
Junio C Hamano1a4e8412005-12-27 08:17:2327
28This command degenerates to download everything to complete the
29asked refs from the remote side when the local side does not
30have a common ancestor commit.
31
32
33OPTIONS
34-------
Junio C Hamanoeb415992008-06-08 22:49:4735--all::
Junio C Hamano4ad294b2007-01-20 02:22:5036Fetch all remote refs.
37
Junio C Hamano18b647e2012-04-24 22:16:1938--stdin::
39Take the list of refs from stdin, one per line. If there
40are refs specified on the command line in addition to this
41option, then the refs from stdin are processed after those
42on the command line.
43+
Junio C Hamano92d80372016-07-13 22:00:0544If `--stateless-rpc` is specified together with this option then
Junio C Hamano18b647e2012-04-24 22:16:1945the list of refs must be in packet format (pkt-line). Each ref must
46be in a separate packet, and the list must end with a flush packet.
47
Junio C Hamanoeb415992008-06-08 22:49:4748-q::
49--quiet::
Junio C Hamano92d80372016-07-13 22:00:0550Pass `-q` flag to 'git unpack-objects'; this makes the
Junio C Hamano1a4e8412005-12-27 08:17:2351cloning process less verbose.
52
Junio C Hamanoeb415992008-06-08 22:49:4753-k::
54--keep::
Junio C Hamano1aa40d22010-01-21 17:46:4355Do not invoke 'git unpack-objects' on received data, but
Junio C Hamano1a4e8412005-12-27 08:17:2356create a single packfile out of it instead, and store it
Junio C Hamano0d3c8152006-11-08 01:33:4157in the object database. If provided twice then the pack is
58locked against repacking.
Junio C Hamano1a4e8412005-12-27 08:17:2359
Junio C Hamanoeb415992008-06-08 22:49:4760--thin::
Junio C Hamano4fdccb22010-02-19 09:58:1461Fetch a "thin" pack, which records objects in deltified form based
62on objects not included in the pack to reduce network traffic.
Junio C Hamano4ad294b2007-01-20 02:22:5063
Junio C Hamanoeb415992008-06-08 22:49:4764--include-tag::
Junio C Hamanobb343172008-03-09 10:39:0965If the remote side supports it, annotated tags objects will
66be downloaded on the same connection as the other objects if
67the object the tag references is downloaded. The caller must
68otherwise determine the tags this option made available.
69
Junio C Hamanoeb415992008-06-08 22:49:4770--upload-pack=<git-upload-pack>::
Junio C Hamanoba4b9282008-07-06 05:20:3171Use this to specify the path to 'git-upload-pack' on the
Junio C Hamano33be8212023-10-23 21:45:5472remote side, if it is not found on your $PATH.
Junio C Hamano1a4e8412005-12-27 08:17:2373Installations of sshd ignores the user's environment
74setup scripts for login shells (e.g. .bash_profile) and
75your privately installed git may not be found on the system
76default $PATH. Another workaround suggested is to set
77up your $PATH in ".bashrc", but this flag is for people
78who do not want to pay the overhead for non-interactive
79shells by having a lean .bashrc file (they set most of
80the things up in .bash_profile).
81
Junio C Hamanoeb415992008-06-08 22:49:4782--exec=<git-upload-pack>::
Junio C Hamano1dbca522015-05-22 20:48:5583Same as --upload-pack=<git-upload-pack>.
Junio C Hamanofa0d4cf2007-01-25 02:23:5884
Junio C Hamanoeb415992008-06-08 22:49:4785--depth=<n>::
Junio C Hamano4ad294b2007-01-20 02:22:5086Limit fetching to ancestor-chains not longer than n.
Junio C Hamano0d1122e2013-02-01 21:37:0287'git-upload-pack' treats the special depth 2147483647 as
88infinite even if there is an ancestor-chain that long.
Junio C Hamano4ad294b2007-01-20 02:22:5089
Junio C Hamano20829a42016-10-10 23:24:4490--shallow-since=<date>::
Junio C Hamano96153bf2018-04-25 08:25:3491Deepen or shorten the history of a shallow repository to
Junio C Hamano20829a42016-10-10 23:24:4492include all reachable commits after <date>.
93
94--shallow-exclude=<revision>::
95Deepen or shorten the history of a shallow repository to
96exclude commits reachable from a specified remote branch or tag.
97This option can be specified multiple times.
98
99--deepen-relative::
100Argument --depth specifies the number of commits from the
101current shallow boundary instead of from the tip of each
102remote branch history.
103
Junio C Hamano4bea0282022-04-04 18:21:49104--refetch::
105Skips negotiating commits with the server in order to fetch all matching
106objects. Use to reapply a new partial clone blob/tree filter.
107
Junio C Hamanoeb415992008-06-08 22:49:47108--no-progress::
Junio C Hamanoaa83a7d2007-03-05 02:37:29109Do not show the progress.
110
Junio C Hamano8eac2682013-09-09 22:35:20111--check-self-contained-and-connected::
112Output "connectivity-ok" if the received pack is
113self-contained and connected.
114
Junio C Hamanoeb415992008-06-08 22:49:47115-v::
Junio C Hamano4ad294b2007-01-20 02:22:50116Run verbosely.
117
Junio C Hamanob73af6c2013-12-03 22:07:11118<repository>::
119The URL to the remote repository.
Junio C Hamano1a4e8412005-12-27 08:17:23120
121<refs>...::
122The remote heads to update from. This is relative to
123$GIT_DIR (e.g. "HEAD", "refs/heads/master"). When
124unspecified, update from all heads the remote side has.
Junio C Hamano4ba4a782016-04-03 19:11:32125+
Junio C Hamano56ace3d2017-01-10 23:43:41126If the remote has enabled the options `uploadpack.allowTipSHA1InWant`,
127`uploadpack.allowReachableSHA1InWant`, or `uploadpack.allowAnySHA1InWant`,
128they may alternatively be 40-hex sha1s present on the remote.
Junio C Hamano1a4e8412005-12-27 08:17:23129
Junio C Hamanob73af6c2013-12-03 22:07:11130SEE ALSO
131--------
132linkgit:git-fetch[1]
133
Junio C Hamano1a4e8412005-12-27 08:17:23134GIT
135---
Junio C Hamanof7c042d2008-06-06 22:50:53136Part of the linkgit:git[1] suite