Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1 | git-fetch-pack(1) |
| 2 | ================= |
| 3 | |
| 4 | NAME |
| 5 | ---- |
Junio C Hamano | 0107892 | 2006-03-10 00:31:47 | [diff] [blame] | 6 | git-fetch-pack - Receive missing objects from another repository |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 7 | |
| 8 | |
| 9 | SYNOPSIS |
| 10 | -------- |
Junio C Hamano | 15567bc | 2011-07-23 00:51:59 | [diff] [blame] | 11 | [verse] |
Junio C Hamano | f2b7494 | 2012-11-20 21:06:26 | [diff] [blame] | 12 | 'git fetch-pack' [--all] [--quiet|-q] [--keep|-k] [--thin] [--include-tag] |
Junio C Hamano | 3d1b5a1 | 2013-05-17 23:34:02 | [diff] [blame] | 13 | [--upload-pack=<git-upload-pack>] |
| 14 | [--depth=<n>] [--no-progress] |
Junio C Hamano | b73af6c | 2013-12-03 22:07:11 | [diff] [blame] | 15 | [-v] <repository> [<refs>...] |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 16 | |
| 17 | DESCRIPTION |
| 18 | ----------- |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 19 | Usually you would want to use 'git fetch', which is a |
Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 20 | higher level wrapper of this command, instead. |
Junio C Hamano | e58607f | 2007-01-17 23:27:45 | [diff] [blame] | 21 | |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 22 | Invokes 'git-upload-pack' on a possibly remote repository |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [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 |
Junio C Hamano | 4fdccb2 | 2010-02-19 09:58:14 | [diff] [blame] | 25 | is found out by scanning the local refs/ hierarchy and sent to |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 26 | 'git-upload-pack' running on the other end. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 27 | |
| 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. |
| 31 | |
| 32 | |
| 33 | OPTIONS |
| 34 | ------- |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 35 | --all:: |
Junio C Hamano | 4ad294b | 2007-01-20 02:22:50 | [diff] [blame] | 36 | Fetch all remote refs. |
| 37 | |
Junio C Hamano | 18b647e | 2012-04-24 22:16:19 | [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 | + |
Junio C Hamano | 92d8037 | 2016-07-13 22:00:05 | [diff] [blame] | 44 | If `--stateless-rpc` is specified together with this option then |
Junio C Hamano | 18b647e | 2012-04-24 22:16:19 | [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 | |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 48 | -q:: |
| 49 | --quiet:: |
Junio C Hamano | 92d8037 | 2016-07-13 22:00:05 | [diff] [blame] | 50 | Pass `-q` flag to 'git unpack-objects'; this makes the |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 51 | cloning process less verbose. |
| 52 | |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 53 | -k:: |
| 54 | --keep:: |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 55 | Do not invoke 'git unpack-objects' on received data, but |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 56 | create a single packfile out of it instead, and store it |
Junio C Hamano | 0d3c815 | 2006-11-08 01:33:41 | [diff] [blame] | 57 | in the object database. If provided twice then the pack is |
| 58 | locked against repacking. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 59 | |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 60 | --thin:: |
Junio C Hamano | 4fdccb2 | 2010-02-19 09:58:14 | [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. |
Junio C Hamano | 4ad294b | 2007-01-20 02:22:50 | [diff] [blame] | 63 | |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 64 | --include-tag:: |
Junio C Hamano | bb34317 | 2008-03-09 10:39:09 | [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 | |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 70 | --upload-pack=<git-upload-pack>:: |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 71 | Use this to specify the path to 'git-upload-pack' on the |
Junio C Hamano | 33be821 | 2023-10-23 21:45:54 | [diff] [blame] | 72 | remote side, if it is not found on your $PATH. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 73 | Installations of sshd ignores the user's environment |
| 74 | setup scripts for login shells (e.g. .bash_profile) and |
| 75 | your privately installed git may not be found on the system |
| 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 | |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 82 | --exec=<git-upload-pack>:: |
Junio C Hamano | 1dbca52 | 2015-05-22 20:48:55 | [diff] [blame] | 83 | Same as --upload-pack=<git-upload-pack>. |
Junio C Hamano | fa0d4cf | 2007-01-25 02:23:58 | [diff] [blame] | 84 | |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 85 | --depth=<n>:: |
Junio C Hamano | 4ad294b | 2007-01-20 02:22:50 | [diff] [blame] | 86 | Limit fetching to ancestor-chains not longer than n. |
Junio C Hamano | 0d1122e | 2013-02-01 21:37:02 | [diff] [blame] | 87 | 'git-upload-pack' treats the special depth 2147483647 as |
| 88 | infinite even if there is an ancestor-chain that long. |
Junio C Hamano | 4ad294b | 2007-01-20 02:22:50 | [diff] [blame] | 89 | |
Junio C Hamano | 20829a4 | 2016-10-10 23:24:44 | [diff] [blame] | 90 | --shallow-since=<date>:: |
Junio C Hamano | 96153bf | 2018-04-25 08:25:34 | [diff] [blame] | 91 | Deepen or shorten the history of a shallow repository to |
Junio C Hamano | 20829a4 | 2016-10-10 23:24:44 | [diff] [blame] | 92 | include all reachable commits after <date>. |
| 93 | |
| 94 | --shallow-exclude=<revision>:: |
| 95 | Deepen or shorten the history of a shallow repository to |
| 96 | exclude commits reachable from a specified remote branch or tag. |
| 97 | This option can be specified multiple times. |
| 98 | |
| 99 | --deepen-relative:: |
| 100 | Argument --depth specifies the number of commits from the |
| 101 | current shallow boundary instead of from the tip of each |
| 102 | remote branch history. |
| 103 | |
Junio C Hamano | 4bea028 | 2022-04-04 18:21:49 | [diff] [blame] | 104 | --refetch:: |
| 105 | Skips negotiating commits with the server in order to fetch all matching |
| 106 | objects. Use to reapply a new partial clone blob/tree filter. |
| 107 | |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 108 | --no-progress:: |
Junio C Hamano | aa83a7d | 2007-03-05 02:37:29 | [diff] [blame] | 109 | Do not show the progress. |
| 110 | |
Junio C Hamano | 8eac268 | 2013-09-09 22:35:20 | [diff] [blame] | 111 | --check-self-contained-and-connected:: |
| 112 | Output "connectivity-ok" if the received pack is |
| 113 | self-contained and connected. |
| 114 | |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 115 | -v:: |
Junio C Hamano | 4ad294b | 2007-01-20 02:22:50 | [diff] [blame] | 116 | Run verbosely. |
| 117 | |
Junio C Hamano | b73af6c | 2013-12-03 22:07:11 | [diff] [blame] | 118 | <repository>:: |
| 119 | The URL to the remote repository. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 120 | |
| 121 | <refs>...:: |
| 122 | The remote heads to update from. This is relative to |
| 123 | $GIT_DIR (e.g. "HEAD", "refs/heads/master"). When |
| 124 | unspecified, update from all heads the remote side has. |
Junio C Hamano | 4ba4a78 | 2016-04-03 19:11:32 | [diff] [blame] | 125 | + |
Junio C Hamano | 56ace3d | 2017-01-10 23:43:41 | [diff] [blame] | 126 | If the remote has enabled the options `uploadpack.allowTipSHA1InWant`, |
| 127 | `uploadpack.allowReachableSHA1InWant`, or `uploadpack.allowAnySHA1InWant`, |
| 128 | they may alternatively be 40-hex sha1s present on the remote. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 129 | |
Junio C Hamano | b73af6c | 2013-12-03 22:07:11 | [diff] [blame] | 130 | SEE ALSO |
| 131 | -------- |
| 132 | linkgit:git-fetch[1] |
| 133 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 134 | GIT |
| 135 | --- |
Junio C Hamano | f7c042d | 2008-06-06 22:50:53 | [diff] [blame] | 136 | Part of the linkgit:git[1] suite |