blob: 24417ee3a66218c9033f450ca07c7b26a3bcc018 [file] [log] [blame]
Junio C Hamano8b3d9dc2005-07-14 00:08:37 -07001git-fetch-pack(1)
2=================
Junio C Hamano8b3d9dc2005-07-14 00:08:37 -07003
4NAME
5----
Fredrik Kuivinen7bd7f282006-03-09 17:24:50 +01006git-fetch-pack - Receive missing objects from another repository
Junio C Hamano8b3d9dc2005-07-14 00:08:37 -07007
8
9SYNOPSIS
10--------
Martin von Zweigbergk7791a1d2011-07-01 22:38:26 -040011[verse]
Thomas Ackermanncc91a852012-10-16 19:20:10 +020012'git fetch-pack' [--all] [--quiet|-q] [--keep|-k] [--thin] [--include-tag]
Felipe Contreras0460ed22013-05-08 20:16:55 -050013 [--upload-pack=<git-upload-pack>]
14 [--depth=<n>] [--no-progress]
Torsten Bögershausen70cce992013-11-08 18:54:05 +010015 [-v] <repository> [<refs>...]
Junio C Hamano8b3d9dc2005-07-14 00:08:37 -070016
17DESCRIPTION
18-----------
Thomas Rast0b444cd2010-01-10 00:33:00 +010019Usually you would want to use 'git fetch', which is a
Jonathan Nieder483bc4f2008-06-30 13:56:34 -050020higher level wrapper of this command, instead.
Junio C Hamano5cb545f2007-01-17 13:03:29 -080021
Jonathan Niederba020ef2008-07-03 00:41:41 -050022Invokes 'git-upload-pack' on a possibly remote repository
Junio C Hamano8b3d9dc2005-07-14 00:08:37 -070023and asks it to send objects missing from this repository, to
24update the named heads. The list of commits available locally
Jeff Kingcc1b8d82010-02-17 20:16:20 -050025is found out by scanning the local refs/ hierarchy and sent to
Jonathan Niederba020ef2008-07-03 00:41:41 -050026'git-upload-pack' running on the other end.
Junio C Hamano8b3d9dc2005-07-14 00:08:37 -070027
Junio C Hamano33b83032005-08-12 02:08:29 -070028This 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.
Junio C Hamano8b3d9dc2005-07-14 00:08:37 -070031
32
33OPTIONS
34-------
Stephan Beyer32402402008-06-08 03:36:09 +020035--all::
Uwe Kleine-König18bd8822007-01-19 13:43:00 +010036 Fetch all remote refs.
37
Ivan Todoroski078b8952012-04-02 17:13:48 +020038--stdin::
39 Take the list of refs from stdin, one per line. If there
40 are refs specified on the command line in addition to this
41 option, then the refs from stdin are processed after those
42 on the command line.
43+
Matthieu Moybcf96262016-06-28 13:40:11 +020044If `--stateless-rpc` is specified together with this option then
Ivan Todoroski078b8952012-04-02 17:13:48 +020045the 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
Stephan Beyer32402402008-06-08 03:36:09 +020048-q::
49--quiet::
Matthieu Moy23f82392016-06-28 13:40:10 +020050 Pass `-q` flag to 'git unpack-objects'; this makes the
Junio C Hamano8b3d9dc2005-07-14 00:08:37 -070051 cloning process less verbose.
52
Stephan Beyer32402402008-06-08 03:36:09 +020053-k::
54--keep::
Thomas Rast0b444cd2010-01-10 00:33:00 +010055 Do not invoke 'git unpack-objects' on received data, but
Junio C Hamanoad897212005-12-14 22:17:38 -080056 create a single packfile out of it instead, and store it
Nicolas Pitreda093d32006-11-01 17:06:23 -050057 in the object database. If provided twice then the pack is
58 locked against repacking.
Junio C Hamanoad897212005-12-14 22:17:38 -080059
Stephan Beyer32402402008-06-08 03:36:09 +020060--thin::
Stephen Boyd738820a2010-02-18 01:10:28 -080061 Fetch a "thin" pack, which records objects in deltified form based
62 on objects not included in the pack to reduce network traffic.
Uwe Kleine-König18bd8822007-01-19 13:43:00 +010063
Stephan Beyer32402402008-06-08 03:36:09 +020064--include-tag::
Shawn O. Pearce348e3902008-03-03 22:27:33 -050065 If the remote side supports it, annotated tags objects will
66 be downloaded on the same connection as the other objects if
67 the object the tag references is downloaded. The caller must
68 otherwise determine the tags this option made available.
69
Stephan Beyer32402402008-06-08 03:36:09 +020070--upload-pack=<git-upload-pack>::
Jonathan Niederba020ef2008-07-03 00:41:41 -050071 Use this to specify the path to 'git-upload-pack' on the
Junio C Hamano8b3d9dc2005-07-14 00:08:37 -070072 remote side, if is not found on your $PATH.
73 Installations of sshd ignores the user's environment
74 setup scripts for login shells (e.g. .bash_profile) and
Christian Meder72e93402005-10-10 16:01:31 -070075 your privately installed git may not be found on the system
Junio C Hamano8b3d9dc2005-07-14 00:08:37 -070076 default $PATH. Another workaround suggested is to set
77 up your $PATH in ".bashrc", but this flag is for people
78 who do not want to pay the overhead for non-interactive
79 shells by having a lean .bashrc file (they set most of
80 the things up in .bash_profile).
81
Stephan Beyer32402402008-06-08 03:36:09 +020082--exec=<git-upload-pack>::
Jeff King1c262bb2015-05-13 01:01:38 -040083 Same as --upload-pack=<git-upload-pack>.
Uwe Kleine-König27dca072007-01-23 09:20:17 +010084
Stephan Beyer32402402008-06-08 03:36:09 +020085--depth=<n>::
Uwe Kleine-König18bd8822007-01-19 13:43:00 +010086 Limit fetching to ancestor-chains not longer than n.
Nguyễn Thái Ngọc Duy4dcb1672013-01-11 16:05:46 +070087 'git-upload-pack' treats the special depth 2147483647 as
88 infinite even if there is an ancestor-chain that long.
Uwe Kleine-König18bd8822007-01-19 13:43:00 +010089
Stephan Beyer32402402008-06-08 03:36:09 +020090--no-progress::
Johannes Schindelin83a5ad62007-02-20 03:01:44 +010091 Do not show the progress.
92
Nguyễn Thái Ngọc Duy9ba38042013-07-21 15:18:05 +070093--check-self-contained-and-connected::
94 Output "connectivity-ok" if the received pack is
95 self-contained and connected.
96
Stephan Beyer32402402008-06-08 03:36:09 +020097-v::
Uwe Kleine-König18bd8822007-01-19 13:43:00 +010098 Run verbosely.
99
Torsten Bögershausen70cce992013-11-08 18:54:05 +0100100<repository>::
101 The URL to the remote repository.
Junio C Hamano8b3d9dc2005-07-14 00:08:37 -0700102
Junio C Hamano33b83032005-08-12 02:08:29 -0700103<refs>...::
Junio C Hamano8b3d9dc2005-07-14 00:08:37 -0700104 The remote heads to update from. This is relative to
105 $GIT_DIR (e.g. "HEAD", "refs/heads/master"). When
106 unspecified, update from all heads the remote side has.
Gabriel Souza Franco754ecb12016-03-04 22:11:38 -0300107+
108If the remote has enabled the options `uploadpack.allowTipSHA1InWant` or
109`uploadpack.allowReachableSHA1InWant`, they may alternatively be 40-hex
110sha1s present on the remote.
Junio C Hamano8b3d9dc2005-07-14 00:08:37 -0700111
Torsten Bögershausen70cce992013-11-08 18:54:05 +0100112SEE ALSO
113--------
114linkgit:git-fetch[1]
115
Junio C Hamano8b3d9dc2005-07-14 00:08:37 -0700116GIT
117---
Christian Couder9e1f0a82008-06-06 09:07:32 +0200118Part of the linkgit:git[1] suite