Junio C Hamano | 8b3d9dc | 2005-07-14 00:08:37 -0700 | [diff] [blame] | 1 | git-fetch-pack(1) |
| 2 | ================= |
Junio C Hamano | 8b3d9dc | 2005-07-14 00:08:37 -0700 | [diff] [blame] | 3 | |
| 4 | NAME |
| 5 | ---- |
Fredrik Kuivinen | 7bd7f28 | 2006-03-09 17:24:50 +0100 | [diff] [blame] | 6 | git-fetch-pack - Receive missing objects from another repository |
Junio C Hamano | 8b3d9dc | 2005-07-14 00:08:37 -0700 | [diff] [blame] | 7 | |
| 8 | |
| 9 | SYNOPSIS |
| 10 | -------- |
Martin von Zweigbergk | 7791a1d | 2011-07-01 22:38:26 -0400 | [diff] [blame] | 11 | [verse] |
Thomas Ackermann | cc91a85 | 2012-10-16 19:20:10 +0200 | [diff] [blame] | 12 | 'git fetch-pack' [--all] [--quiet|-q] [--keep|-k] [--thin] [--include-tag] |
Felipe Contreras | 0460ed2 | 2013-05-08 20:16:55 -0500 | [diff] [blame] | 13 | [--upload-pack=<git-upload-pack>] |
| 14 | [--depth=<n>] [--no-progress] |
Torsten Bögershausen | 70cce99 | 2013-11-08 18:54:05 +0100 | [diff] [blame] | 15 | [-v] <repository> [<refs>...] |
Junio C Hamano | 8b3d9dc | 2005-07-14 00:08:37 -0700 | [diff] [blame] | 16 | |
| 17 | DESCRIPTION |
| 18 | ----------- |
Thomas Rast | 0b444cd | 2010-01-10 00:33:00 +0100 | [diff] [blame] | 19 | Usually you would want to use 'git fetch', which is a |
Jonathan Nieder | 483bc4f | 2008-06-30 13:56:34 -0500 | [diff] [blame] | 20 | higher level wrapper of this command, instead. |
Junio C Hamano | 5cb545f | 2007-01-17 13:03:29 -0800 | [diff] [blame] | 21 | |
Jonathan Nieder | ba020ef | 2008-07-03 00:41:41 -0500 | [diff] [blame] | 22 | Invokes 'git-upload-pack' on a possibly remote repository |
Junio C Hamano | 8b3d9dc | 2005-07-14 00:08:37 -0700 | [diff] [blame] | 23 | and asks it to send objects missing from this repository, to |
| 24 | update the named heads. The list of commits available locally |
Jeff King | cc1b8d8 | 2010-02-17 20:16:20 -0500 | [diff] [blame] | 25 | is found out by scanning the local refs/ hierarchy and sent to |
Jonathan Nieder | ba020ef | 2008-07-03 00:41:41 -0500 | [diff] [blame] | 26 | 'git-upload-pack' running on the other end. |
Junio C Hamano | 8b3d9dc | 2005-07-14 00:08:37 -0700 | [diff] [blame] | 27 | |
Junio C Hamano | 33b8303 | 2005-08-12 02:08:29 -0700 | [diff] [blame] | 28 | This command degenerates to download everything to complete the |
| 29 | asked refs from the remote side when the local side does not |
| 30 | have a common ancestor commit. |
Junio C Hamano | 8b3d9dc | 2005-07-14 00:08:37 -0700 | [diff] [blame] | 31 | |
| 32 | |
| 33 | OPTIONS |
| 34 | ------- |
Stephan Beyer | 3240240 | 2008-06-08 03:36:09 +0200 | [diff] [blame] | 35 | --all:: |
Uwe Kleine-König | 18bd882 | 2007-01-19 13:43:00 +0100 | [diff] [blame] | 36 | Fetch all remote refs. |
| 37 | |
Ivan Todoroski | 078b895 | 2012-04-02 17:13:48 +0200 | [diff] [blame] | 38 | --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 Moy | bcf9626 | 2016-06-28 13:40:11 +0200 | [diff] [blame] | 44 | If `--stateless-rpc` is specified together with this option then |
Ivan Todoroski | 078b895 | 2012-04-02 17:13:48 +0200 | [diff] [blame] | 45 | the list of refs must be in packet format (pkt-line). Each ref must |
| 46 | be in a separate packet, and the list must end with a flush packet. |
| 47 | |
Stephan Beyer | 3240240 | 2008-06-08 03:36:09 +0200 | [diff] [blame] | 48 | -q:: |
| 49 | --quiet:: |
Matthieu Moy | 23f8239 | 2016-06-28 13:40:10 +0200 | [diff] [blame] | 50 | Pass `-q` flag to 'git unpack-objects'; this makes the |
Junio C Hamano | 8b3d9dc | 2005-07-14 00:08:37 -0700 | [diff] [blame] | 51 | cloning process less verbose. |
| 52 | |
Stephan Beyer | 3240240 | 2008-06-08 03:36:09 +0200 | [diff] [blame] | 53 | -k:: |
| 54 | --keep:: |
Thomas Rast | 0b444cd | 2010-01-10 00:33:00 +0100 | [diff] [blame] | 55 | Do not invoke 'git unpack-objects' on received data, but |
Junio C Hamano | ad89721 | 2005-12-14 22:17:38 -0800 | [diff] [blame] | 56 | create a single packfile out of it instead, and store it |
Nicolas Pitre | da093d3 | 2006-11-01 17:06:23 -0500 | [diff] [blame] | 57 | in the object database. If provided twice then the pack is |
| 58 | locked against repacking. |
Junio C Hamano | ad89721 | 2005-12-14 22:17:38 -0800 | [diff] [blame] | 59 | |
Stephan Beyer | 3240240 | 2008-06-08 03:36:09 +0200 | [diff] [blame] | 60 | --thin:: |
Stephen Boyd | 738820a | 2010-02-18 01:10:28 -0800 | [diff] [blame] | 61 | 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önig | 18bd882 | 2007-01-19 13:43:00 +0100 | [diff] [blame] | 63 | |
Stephan Beyer | 3240240 | 2008-06-08 03:36:09 +0200 | [diff] [blame] | 64 | --include-tag:: |
Shawn O. Pearce | 348e390 | 2008-03-03 22:27:33 -0500 | [diff] [blame] | 65 | 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 Beyer | 3240240 | 2008-06-08 03:36:09 +0200 | [diff] [blame] | 70 | --upload-pack=<git-upload-pack>:: |
Jonathan Nieder | ba020ef | 2008-07-03 00:41:41 -0500 | [diff] [blame] | 71 | Use this to specify the path to 'git-upload-pack' on the |
Junio C Hamano | 8b3d9dc | 2005-07-14 00:08:37 -0700 | [diff] [blame] | 72 | 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 Meder | 72e9340 | 2005-10-10 16:01:31 -0700 | [diff] [blame] | 75 | your privately installed git may not be found on the system |
Junio C Hamano | 8b3d9dc | 2005-07-14 00:08:37 -0700 | [diff] [blame] | 76 | 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 Beyer | 3240240 | 2008-06-08 03:36:09 +0200 | [diff] [blame] | 82 | --exec=<git-upload-pack>:: |
Jeff King | 1c262bb | 2015-05-13 01:01:38 -0400 | [diff] [blame] | 83 | Same as --upload-pack=<git-upload-pack>. |
Uwe Kleine-König | 27dca07 | 2007-01-23 09:20:17 +0100 | [diff] [blame] | 84 | |
Stephan Beyer | 3240240 | 2008-06-08 03:36:09 +0200 | [diff] [blame] | 85 | --depth=<n>:: |
Uwe Kleine-König | 18bd882 | 2007-01-19 13:43:00 +0100 | [diff] [blame] | 86 | Limit fetching to ancestor-chains not longer than n. |
Nguyễn Thái Ngọc Duy | 4dcb167 | 2013-01-11 16:05:46 +0700 | [diff] [blame] | 87 | 'git-upload-pack' treats the special depth 2147483647 as |
| 88 | infinite even if there is an ancestor-chain that long. |
Uwe Kleine-König | 18bd882 | 2007-01-19 13:43:00 +0100 | [diff] [blame] | 89 | |
Stephan Beyer | 3240240 | 2008-06-08 03:36:09 +0200 | [diff] [blame] | 90 | --no-progress:: |
Johannes Schindelin | 83a5ad6 | 2007-02-20 03:01:44 +0100 | [diff] [blame] | 91 | Do not show the progress. |
| 92 | |
Nguyễn Thái Ngọc Duy | 9ba3804 | 2013-07-21 15:18:05 +0700 | [diff] [blame] | 93 | --check-self-contained-and-connected:: |
| 94 | Output "connectivity-ok" if the received pack is |
| 95 | self-contained and connected. |
| 96 | |
Stephan Beyer | 3240240 | 2008-06-08 03:36:09 +0200 | [diff] [blame] | 97 | -v:: |
Uwe Kleine-König | 18bd882 | 2007-01-19 13:43:00 +0100 | [diff] [blame] | 98 | Run verbosely. |
| 99 | |
Torsten Bögershausen | 70cce99 | 2013-11-08 18:54:05 +0100 | [diff] [blame] | 100 | <repository>:: |
| 101 | The URL to the remote repository. |
Junio C Hamano | 8b3d9dc | 2005-07-14 00:08:37 -0700 | [diff] [blame] | 102 | |
Junio C Hamano | 33b8303 | 2005-08-12 02:08:29 -0700 | [diff] [blame] | 103 | <refs>...:: |
Junio C Hamano | 8b3d9dc | 2005-07-14 00:08:37 -0700 | [diff] [blame] | 104 | 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 Franco | 754ecb1 | 2016-03-04 22:11:38 -0300 | [diff] [blame] | 107 | + |
| 108 | If the remote has enabled the options `uploadpack.allowTipSHA1InWant` or |
| 109 | `uploadpack.allowReachableSHA1InWant`, they may alternatively be 40-hex |
| 110 | sha1s present on the remote. |
Junio C Hamano | 8b3d9dc | 2005-07-14 00:08:37 -0700 | [diff] [blame] | 111 | |
Torsten Bögershausen | 70cce99 | 2013-11-08 18:54:05 +0100 | [diff] [blame] | 112 | SEE ALSO |
| 113 | -------- |
| 114 | linkgit:git-fetch[1] |
| 115 | |
Junio C Hamano | 8b3d9dc | 2005-07-14 00:08:37 -0700 | [diff] [blame] | 116 | GIT |
| 117 | --- |
Christian Couder | 9e1f0a8 | 2008-06-06 09:07:32 +0200 | [diff] [blame] | 118 | Part of the linkgit:git[1] suite |