]>
Commit | Line | Data |
---|---|---|
8b3d9dc0 JH |
1 | git-fetch-pack(1) |
2 | ================= | |
8b3d9dc0 JH |
3 | |
4 | NAME | |
5 | ---- | |
7bd7f280 | 6 | git-fetch-pack - Receive missing objects from another repository |
8b3d9dc0 JH |
7 | |
8 | ||
9 | SYNOPSIS | |
10 | -------- | |
7791a1d9 | 11 | [verse] |
cc91a85e | 12 | 'git fetch-pack' [--all] [--quiet|-q] [--keep|-k] [--thin] [--include-tag] |
0460ed2c FC |
13 | [--upload-pack=<git-upload-pack>] |
14 | [--depth=<n>] [--no-progress] | |
70cce994 | 15 | [-v] <repository> [<refs>...] |
8b3d9dc0 JH |
16 | |
17 | DESCRIPTION | |
18 | ----------- | |
0b444cdb | 19 | Usually you would want to use 'git fetch', which is a |
483bc4f0 | 20 | higher level wrapper of this command, instead. |
5cb545fa | 21 | |
ba020ef5 | 22 | Invokes 'git-upload-pack' on a possibly remote repository |
8b3d9dc0 JH |
23 | and asks it to send objects missing from this repository, to |
24 | update the named heads. The list of commits available locally | |
cc1b8d8b | 25 | is found out by scanning the local refs/ hierarchy and sent to |
ba020ef5 | 26 | 'git-upload-pack' running on the other end. |
8b3d9dc0 | 27 | |
33b83034 JH |
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. | |
8b3d9dc0 JH |
31 | |
32 | ||
33 | OPTIONS | |
34 | ------- | |
3240240f | 35 | --all:: |
18bd8821 UKK |
36 | Fetch all remote refs. |
37 | ||
078b895f IT |
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 | + | |
bcf9626a | 44 | If `--stateless-rpc` is specified together with this option then |
078b895f IT |
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 | ||
3240240f SB |
48 | -q:: |
49 | --quiet:: | |
23f8239b | 50 | Pass `-q` flag to 'git unpack-objects'; this makes the |
8b3d9dc0 JH |
51 | cloning process less verbose. |
52 | ||
3240240f SB |
53 | -k:: |
54 | --keep:: | |
0b444cdb | 55 | Do not invoke 'git unpack-objects' on received data, but |
ad897215 | 56 | create a single packfile out of it instead, and store it |
da093d37 NP |
57 | in the object database. If provided twice then the pack is |
58 | locked against repacking. | |
ad897215 | 59 | |
3240240f | 60 | --thin:: |
738820a9 SB |
61 | Fetch a "thin" pack, which records objects in deltified form based |
62 | on objects not included in the pack to reduce network traffic. | |
18bd8821 | 63 | |
3240240f | 64 | --include-tag:: |
348e390b SP |
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 | ||
3240240f | 70 | --upload-pack=<git-upload-pack>:: |
ba020ef5 | 71 | Use this to specify the path to 'git-upload-pack' on the |
8b3d9dc0 JH |
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 | |
72e9340c | 75 | your privately installed git may not be found on the system |
8b3d9dc0 JH |
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 | ||
3240240f | 82 | --exec=<git-upload-pack>:: |
1c262bb7 | 83 | Same as --upload-pack=<git-upload-pack>. |
27dca07f | 84 | |
3240240f | 85 | --depth=<n>:: |
18bd8821 | 86 | Limit fetching to ancestor-chains not longer than n. |
4dcb167f NTND |
87 | 'git-upload-pack' treats the special depth 2147483647 as |
88 | infinite even if there is an ancestor-chain that long. | |
18bd8821 | 89 | |
508ea882 | 90 | --shallow-since=<date>:: |
c30d4f1b | 91 | Deepen or shorten the history of a shallow repository to |
508ea882 NTND |
92 | include all reachable commits after <date>. |
93 | ||
a45a2600 NTND |
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 | ||
cccf74e2 NTND |
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 | ||
3240240f | 104 | --no-progress:: |
83a5ad61 JS |
105 | Do not show the progress. |
106 | ||
9ba38048 NTND |
107 | --check-self-contained-and-connected:: |
108 | Output "connectivity-ok" if the received pack is | |
109 | self-contained and connected. | |
110 | ||
3240240f | 111 | -v:: |
18bd8821 UKK |
112 | Run verbosely. |
113 | ||
70cce994 TB |
114 | <repository>:: |
115 | The URL to the remote repository. | |
8b3d9dc0 | 116 | |
33b83034 | 117 | <refs>...:: |
8b3d9dc0 JH |
118 | The remote heads to update from. This is relative to |
119 | $GIT_DIR (e.g. "HEAD", "refs/heads/master"). When | |
120 | unspecified, update from all heads the remote side has. | |
754ecb1c | 121 | + |
f8edeaa0 DT |
122 | If the remote has enabled the options `uploadpack.allowTipSHA1InWant`, |
123 | `uploadpack.allowReachableSHA1InWant`, or `uploadpack.allowAnySHA1InWant`, | |
124 | they may alternatively be 40-hex sha1s present on the remote. | |
8b3d9dc0 | 125 | |
70cce994 TB |
126 | SEE ALSO |
127 | -------- | |
128 | linkgit:git-fetch[1] | |
129 | ||
8b3d9dc0 JH |
130 | GIT |
131 | --- | |
9e1f0a85 | 132 | Part of the linkgit:git[1] suite |