Junio C Hamano | 6ac2f14 | 2007-03-01 01:24:56 | [diff] [blame] | 1 | git-bundle(1) |
| 2 | ============= |
| 3 | |
| 4 | NAME |
| 5 | ---- |
| 6 | git-bundle - Move objects and refs by archive |
| 7 | |
| 8 | |
| 9 | SYNOPSIS |
| 10 | -------- |
Junio C Hamano | a9b8d24 | 2007-05-19 04:51:55 | [diff] [blame] | 11 | [verse] |
Junio C Hamano | 3f5b4a7 | 2023-03-19 22:19:03 | [diff] [blame] | 12 | 'git bundle' create [-q | --quiet | --progress] |
Junio C Hamano | c425d10 | 2020-08-12 01:44:24 | [diff] [blame] | 13 | [--version=<version>] <file> <git-rev-list-args> |
Junio C Hamano | 8ef91f3 | 2019-12-01 22:58:27 | [diff] [blame] | 14 | 'git bundle' verify [-q | --quiet] <file> |
Junio C Hamano | d2179ef | 2010-10-22 04:12:17 | [diff] [blame] | 15 | 'git bundle' list-heads <file> [<refname>...] |
Junio C Hamano | de44de3 | 2021-09-20 22:46:08 | [diff] [blame] | 16 | 'git bundle' unbundle [--progress] <file> [<refname>...] |
Junio C Hamano | 6ac2f14 | 2007-03-01 01:24:56 | [diff] [blame] | 17 | |
| 18 | DESCRIPTION |
| 19 | ----------- |
| 20 | |
Junio C Hamano | d2e3056 | 2021-08-24 23:21:51 | [diff] [blame] | 21 | Create, unpack, and manipulate "bundle" files. Bundles are used for |
| 22 | the "offline" transfer of Git objects without an active "server" |
| 23 | sitting on the other side of the network connection. |
Junio C Hamano | b489685 | 2019-12-10 23:15:09 | [diff] [blame] | 24 | |
Junio C Hamano | d2e3056 | 2021-08-24 23:21:51 | [diff] [blame] | 25 | They can be used to create both incremental and full backups of a |
| 26 | repository, and to relay the state of the references in one repository |
| 27 | to another. |
Junio C Hamano | b489685 | 2019-12-10 23:15:09 | [diff] [blame] | 28 | |
Junio C Hamano | d2e3056 | 2021-08-24 23:21:51 | [diff] [blame] | 29 | Git commands that fetch or otherwise "read" via protocols such as |
| 30 | `ssh://` and `https://` can also operate on bundle files. It is |
| 31 | possible linkgit:git-clone[1] a new repository from a bundle, to use |
| 32 | linkgit:git-fetch[1] to fetch from one, and to list the references |
| 33 | contained within it with linkgit:git-ls-remote[1]. There's no |
| 34 | corresponding "write" support, i.e.a 'git push' into a bundle is not |
| 35 | supported. |
| 36 | |
| 37 | See the "EXAMPLES" section below for examples of how to use bundles. |
| 38 | |
| 39 | BUNDLE FORMAT |
| 40 | ------------- |
| 41 | |
| 42 | Bundles are `.pack` files (see linkgit:git-pack-objects[1]) with a |
| 43 | header indicating what references are contained within the bundle. |
| 44 | |
Junio C Hamano | 3778ccc | 2022-09-15 23:33:17 | [diff] [blame] | 45 | Like the packed archive format itself bundles can either be |
Junio C Hamano | d2e3056 | 2021-08-24 23:21:51 | [diff] [blame] | 46 | self-contained, or be created using exclusions. |
| 47 | See the "OBJECT PREREQUISITES" section below. |
| 48 | |
| 49 | Bundles created using revision exclusions are "thin packs" created |
| 50 | using the `--thin` option to linkgit:git-pack-objects[1], and |
| 51 | unbundled using the `--fix-thin` option to linkgit:git-index-pack[1]. |
| 52 | |
| 53 | There is no option to create a "thick pack" when using revision |
Junio C Hamano | 19dcd3f | 2021-10-29 23:20:47 | [diff] [blame] | 54 | exclusions, and users should not be concerned about the difference. By |
| 55 | using "thin packs", bundles created using exclusions are smaller in |
Junio C Hamano | d2e3056 | 2021-08-24 23:21:51 | [diff] [blame] | 56 | size. That they're "thin" under the hood is merely noted here as a |
Junio C Hamano | 19dcd3f | 2021-10-29 23:20:47 | [diff] [blame] | 57 | curiosity, and as a reference to other documentation. |
Junio C Hamano | d2e3056 | 2021-08-24 23:21:51 | [diff] [blame] | 58 | |
Junio C Hamano | 04495a1 | 2022-08-18 21:13:08 | [diff] [blame] | 59 | See linkgit:gitformat-bundle[5] for more details and the discussion of |
| 60 | "thin pack" in linkgit:gitformat-pack[5] for further details. |
Junio C Hamano | 6ac2f14 | 2007-03-01 01:24:56 | [diff] [blame] | 61 | |
| 62 | OPTIONS |
| 63 | ------- |
| 64 | |
Junio C Hamano | 8ef91f3 | 2019-12-01 22:58:27 | [diff] [blame] | 65 | create [options] <file> <git-rev-list-args>:: |
Junio C Hamano | 2db3e75 | 2010-09-03 21:33:06 | [diff] [blame] | 66 | Used to create a bundle named 'file'. This requires the |
Junio C Hamano | b489685 | 2019-12-10 23:15:09 | [diff] [blame] | 67 | '<git-rev-list-args>' arguments to define the bundle contents. |
Junio C Hamano | 8ef91f3 | 2019-12-01 22:58:27 | [diff] [blame] | 68 | 'options' contains the options specific to the 'git bundle create' |
Junio C Hamano | 3f5b4a7 | 2023-03-19 22:19:03 | [diff] [blame] | 69 | subcommand. If 'file' is `-`, the bundle is written to stdout. |
Junio C Hamano | 6ac2f14 | 2007-03-01 01:24:56 | [diff] [blame] | 70 | |
| 71 | verify <file>:: |
Junio C Hamano | 2db3e75 | 2010-09-03 21:33:06 | [diff] [blame] | 72 | Used to check that a bundle file is valid and will apply |
| 73 | cleanly to the current repository. This includes checks on the |
| 74 | bundle format itself as well as checking that the prerequisite |
| 75 | commits exist and are fully linked in the current repository. |
Junio C Hamano | 4bea028 | 2022-04-04 18:21:49 | [diff] [blame] | 76 | Then, 'git bundle' prints a list of missing commits, if any. |
| 77 | Finally, information about additional capabilities, such as "object |
Junio C Hamano | 04495a1 | 2022-08-18 21:13:08 | [diff] [blame] | 78 | filter", is printed. See "Capabilities" in linkgit:gitformat-bundle[5] |
Junio C Hamano | 4bea028 | 2022-04-04 18:21:49 | [diff] [blame] | 79 | for more information. The exit code is zero for success, but will |
Junio C Hamano | 3f5b4a7 | 2023-03-19 22:19:03 | [diff] [blame] | 80 | be nonzero if the bundle file is invalid. If 'file' is `-`, the |
| 81 | bundle is read from stdin. |
Junio C Hamano | 6ac2f14 | 2007-03-01 01:24:56 | [diff] [blame] | 82 | |
| 83 | list-heads <file>:: |
Junio C Hamano | 2db3e75 | 2010-09-03 21:33:06 | [diff] [blame] | 84 | Lists the references defined in the bundle. If followed by a |
| 85 | list of references, only references matching those given are |
Junio C Hamano | 3f5b4a7 | 2023-03-19 22:19:03 | [diff] [blame] | 86 | printed out. If 'file' is `-`, the bundle is read from stdin. |
Junio C Hamano | 6ac2f14 | 2007-03-01 01:24:56 | [diff] [blame] | 87 | |
| 88 | unbundle <file>:: |
Junio C Hamano | 2db3e75 | 2010-09-03 21:33:06 | [diff] [blame] | 89 | Passes the objects in the bundle to 'git index-pack' |
| 90 | for storage in the repository, then prints the names of all |
| 91 | defined references. If a list of references is given, only |
| 92 | references matching those in the list are printed. This command is |
| 93 | really plumbing, intended to be called only by 'git fetch'. |
Junio C Hamano | 3f5b4a7 | 2023-03-19 22:19:03 | [diff] [blame] | 94 | If 'file' is `-`, the bundle is read from stdin. |
Junio C Hamano | 6ac2f14 | 2007-03-01 01:24:56 | [diff] [blame] | 95 | |
Junio C Hamano | 2db3e75 | 2010-09-03 21:33:06 | [diff] [blame] | 96 | <git-rev-list-args>:: |
| 97 | A list of arguments, acceptable to 'git rev-parse' and |
Junio C Hamano | 7165bf7 | 2011-01-04 22:06:18 | [diff] [blame] | 98 | 'git rev-list' (and containing a named ref, see SPECIFYING REFERENCES |
Junio C Hamano | 2db3e75 | 2010-09-03 21:33:06 | [diff] [blame] | 99 | below), that specifies the specific objects and references |
Junio C Hamano | b76a686 | 2012-05-02 22:02:46 | [diff] [blame] | 100 | to transport. For example, `master~10..master` causes the |
Junio C Hamano | 2db3e75 | 2010-09-03 21:33:06 | [diff] [blame] | 101 | current master reference to be packaged along with all objects |
| 102 | added since its 10th ancestor commit. There is no explicit |
| 103 | limit to the number of references and objects that may be |
| 104 | packaged. |
Junio C Hamano | 6ac2f14 | 2007-03-01 01:24:56 | [diff] [blame] | 105 | |
| 106 | |
Junio C Hamano | d2179ef | 2010-10-22 04:12:17 | [diff] [blame] | 107 | [<refname>...]:: |
Junio C Hamano | 2db3e75 | 2010-09-03 21:33:06 | [diff] [blame] | 108 | A list of references used to limit the references reported as |
| 109 | available. This is principally of use to 'git fetch', which |
| 110 | expects to receive only those references asked for and not |
| 111 | necessarily everything in the pack (in this case, 'git bundle' acts |
| 112 | like 'git fetch-pack'). |
Junio C Hamano | 6ac2f14 | 2007-03-01 01:24:56 | [diff] [blame] | 113 | |
Junio C Hamano | 8ef91f3 | 2019-12-01 22:58:27 | [diff] [blame] | 114 | --progress:: |
| 115 | Progress status is reported on the standard error stream |
| 116 | by default when it is attached to a terminal, unless -q |
| 117 | is specified. This flag forces progress status even if |
| 118 | the standard error stream is not directed to a terminal. |
| 119 | |
Junio C Hamano | c425d10 | 2020-08-12 01:44:24 | [diff] [blame] | 120 | --version=<version>:: |
| 121 | Specify the bundle version. Version 2 is the older format and can only be |
| 122 | used with SHA-1 repositories; the newer version 3 contains capabilities that |
| 123 | permit extensions. The default is the oldest supported format, based on the |
| 124 | hash algorithm in use. |
| 125 | |
Junio C Hamano | 8ef91f3 | 2019-12-01 22:58:27 | [diff] [blame] | 126 | -q:: |
| 127 | --quiet:: |
| 128 | This flag makes the command not to report its progress |
| 129 | on the standard error stream. |
| 130 | |
Junio C Hamano | 6ac2f14 | 2007-03-01 01:24:56 | [diff] [blame] | 131 | SPECIFYING REFERENCES |
| 132 | --------------------- |
| 133 | |
Junio C Hamano | 19dcd3f | 2021-10-29 23:20:47 | [diff] [blame] | 134 | Revisions must be accompanied by reference names to be packaged in a |
Junio C Hamano | d2e3056 | 2021-08-24 23:21:51 | [diff] [blame] | 135 | bundle. |
Junio C Hamano | 6ac2f14 | 2007-03-01 01:24:56 | [diff] [blame] | 136 | |
Junio C Hamano | d2e3056 | 2021-08-24 23:21:51 | [diff] [blame] | 137 | More than one reference may be packaged, and more than one set of prerequisite objects can |
| 138 | be specified. The objects packaged are those not contained in the |
| 139 | union of the prerequisites. |
| 140 | |
| 141 | The 'git bundle create' command resolves the reference names for you |
| 142 | using the same rules as `git rev-parse --abbrev-ref=loose`. Each |
| 143 | prerequisite can be specified explicitly (e.g. `^master~10`), or implicitly |
| 144 | (e.g. `master~10..master`, `--since=10.days.ago master`). |
| 145 | |
| 146 | All of these simple cases are OK (assuming we have a "master" and |
| 147 | "next" branch): |
| 148 | |
| 149 | ---------------- |
| 150 | $ git bundle create master.bundle master |
| 151 | $ echo master | git bundle create master.bundle --stdin |
| 152 | $ git bundle create master-and-next.bundle master next |
| 153 | $ (echo master; echo next) | git bundle create master-and-next.bundle --stdin |
| 154 | ---------------- |
| 155 | |
| 156 | And so are these (and the same but omitted `--stdin` examples): |
| 157 | |
| 158 | ---------------- |
| 159 | $ git bundle create recent-master.bundle master~10..master |
| 160 | $ git bundle create recent-updates.bundle master~10..master next~5..next |
| 161 | ---------------- |
| 162 | |
| 163 | A revision name or a range whose right-hand-side cannot be resolved to |
| 164 | a reference is not accepted: |
| 165 | |
| 166 | ---------------- |
| 167 | $ git bundle create HEAD.bundle $(git rev-parse HEAD) |
| 168 | fatal: Refusing to create empty bundle. |
| 169 | $ git bundle create master-yesterday.bundle master~10..master~5 |
| 170 | fatal: Refusing to create empty bundle. |
| 171 | ---------------- |
| 172 | |
| 173 | OBJECT PREREQUISITES |
| 174 | -------------------- |
| 175 | |
| 176 | When creating bundles it is possible to create a self-contained bundle |
| 177 | that can be unbundled in a repository with no common history, as well |
| 178 | as providing negative revisions to exclude objects needed in the |
| 179 | earlier parts of the history. |
| 180 | |
| 181 | Feeding a revision such as `new` to `git bundle create` will create a |
| 182 | bundle file that contains all the objects reachable from the revision |
| 183 | `new`. That bundle can be unbundled in any repository to obtain a full |
| 184 | history that leads to the revision `new`: |
| 185 | |
| 186 | ---------------- |
| 187 | $ git bundle create full.bundle new |
| 188 | ---------------- |
| 189 | |
| 190 | A revision range such as `old..new` will produce a bundle file that |
| 191 | will require the revision `old` (and any objects reachable from it) |
| 192 | to exist for the bundle to be "unbundle"-able: |
| 193 | |
| 194 | ---------------- |
| 195 | $ git bundle create full.bundle old..new |
| 196 | ---------------- |
| 197 | |
| 198 | A self-contained bundle without any prerequisites can be extracted |
| 199 | into anywhere, even into an empty repository, or be cloned from |
| 200 | (i.e., `new`, but not `old..new`). |
| 201 | |
Junio C Hamano | 1de7572 | 2009-03-26 08:39:38 | [diff] [blame] | 202 | It is okay to err on the side of caution, causing the bundle file |
| 203 | to contain objects already in the destination, as these are ignored |
Junio C Hamano | 6ac2f14 | 2007-03-01 01:24:56 | [diff] [blame] | 204 | when unpacking at the destination. |
| 205 | |
Junio C Hamano | b489685 | 2019-12-10 23:15:09 | [diff] [blame] | 206 | If you want to match `git clone --mirror`, which would include your |
| 207 | refs such as `refs/remotes/*`, use `--all`. |
| 208 | If you want to provide the same set of refs that a clone directly |
| 209 | from the source repository would get, use `--branches --tags` for |
| 210 | the `<git-rev-list-args>`. |
| 211 | |
Junio C Hamano | d2e3056 | 2021-08-24 23:21:51 | [diff] [blame] | 212 | The 'git bundle verify' command can be used to check whether your |
| 213 | recipient repository has the required prerequisite commits for a |
| 214 | bundle. |
| 215 | |
Junio C Hamano | b9d9d90 | 2018-05-23 07:07:42 | [diff] [blame] | 216 | EXAMPLES |
| 217 | -------- |
Junio C Hamano | 6ac2f14 | 2007-03-01 01:24:56 | [diff] [blame] | 218 | |
Junio C Hamano | a3bb6eb | 2009-02-05 01:26:33 | [diff] [blame] | 219 | Assume you want to transfer the history from a repository R1 on machine A |
| 220 | to another repository R2 on machine B. |
Junio C Hamano | 6ac2f14 | 2007-03-01 01:24:56 | [diff] [blame] | 221 | For whatever reason, direct connection between A and B is not allowed, |
Junio C Hamano | 1de7572 | 2009-03-26 08:39:38 | [diff] [blame] | 222 | but we can move data from A to B via some mechanism (CD, email, etc.). |
| 223 | We want to update R2 with development made on the branch master in R1. |
Junio C Hamano | 601f3e5 | 2008-02-25 08:40:42 | [diff] [blame] | 224 | |
Junio C Hamano | 1de7572 | 2009-03-26 08:39:38 | [diff] [blame] | 225 | To bootstrap the process, you can first create a bundle that does not have |
Junio C Hamano | d2e3056 | 2021-08-24 23:21:51 | [diff] [blame] | 226 | any prerequisites. You can use a tag to remember up to what commit you last |
Junio C Hamano | 1de7572 | 2009-03-26 08:39:38 | [diff] [blame] | 227 | processed, in order to make it easy to later update the other repository |
| 228 | with an incremental bundle: |
Junio C Hamano | 601f3e5 | 2008-02-25 08:40:42 | [diff] [blame] | 229 | |
Junio C Hamano | a3bb6eb | 2009-02-05 01:26:33 | [diff] [blame] | 230 | ---------------- |
| 231 | machineA$ cd R1 |
Junio C Hamano | 6116912 | 2009-02-09 18:05:49 | [diff] [blame] | 232 | machineA$ git bundle create file.bundle master |
Junio C Hamano | a3bb6eb | 2009-02-05 01:26:33 | [diff] [blame] | 233 | machineA$ git tag -f lastR2bundle master |
| 234 | ---------------- |
Junio C Hamano | 601f3e5 | 2008-02-25 08:40:42 | [diff] [blame] | 235 | |
Junio C Hamano | 6bdcc7d | 2013-01-09 00:15:42 | [diff] [blame] | 236 | Then you transfer file.bundle to the target machine B. Because this |
| 237 | bundle does not require any existing object to be extracted, you can |
| 238 | create a new repository on machine B by cloning from it: |
Junio C Hamano | 601f3e5 | 2008-02-25 08:40:42 | [diff] [blame] | 239 | |
Junio C Hamano | a3bb6eb | 2009-02-05 01:26:33 | [diff] [blame] | 240 | ---------------- |
Junio C Hamano | 6bdcc7d | 2013-01-09 00:15:42 | [diff] [blame] | 241 | machineB$ git clone -b master /home/me/tmp/file.bundle R2 |
Junio C Hamano | a3bb6eb | 2009-02-05 01:26:33 | [diff] [blame] | 242 | ---------------- |
Junio C Hamano | 6ac2f14 | 2007-03-01 01:24:56 | [diff] [blame] | 243 | |
Junio C Hamano | a3bb6eb | 2009-02-05 01:26:33 | [diff] [blame] | 244 | This will define a remote called "origin" in the resulting repository that |
Junio C Hamano | 1de7572 | 2009-03-26 08:39:38 | [diff] [blame] | 245 | lets you fetch and pull from the bundle. The $GIT_DIR/config file in R2 will |
Junio C Hamano | a3bb6eb | 2009-02-05 01:26:33 | [diff] [blame] | 246 | have an entry like this: |
Junio C Hamano | 6ac2f14 | 2007-03-01 01:24:56 | [diff] [blame] | 247 | |
Junio C Hamano | 601f3e5 | 2008-02-25 08:40:42 | [diff] [blame] | 248 | ------------------------ |
Junio C Hamano | a3bb6eb | 2009-02-05 01:26:33 | [diff] [blame] | 249 | [remote "origin"] |
Junio C Hamano | 6116912 | 2009-02-09 18:05:49 | [diff] [blame] | 250 | url = /home/me/tmp/file.bundle |
Junio C Hamano | 6ac2f14 | 2007-03-01 01:24:56 | [diff] [blame] | 251 | fetch = refs/heads/*:refs/remotes/origin/* |
Junio C Hamano | 601f3e5 | 2008-02-25 08:40:42 | [diff] [blame] | 252 | ------------------------ |
Junio C Hamano | 6ac2f14 | 2007-03-01 01:24:56 | [diff] [blame] | 253 | |
Junio C Hamano | 1de7572 | 2009-03-26 08:39:38 | [diff] [blame] | 254 | To update the resulting mine.git repository, you can fetch or pull after |
| 255 | replacing the bundle stored at /home/me/tmp/file.bundle with incremental |
| 256 | updates. |
Junio C Hamano | 6ac2f14 | 2007-03-01 01:24:56 | [diff] [blame] | 257 | |
Junio C Hamano | 1de7572 | 2009-03-26 08:39:38 | [diff] [blame] | 258 | After working some more in the original repository, you can create an |
| 259 | incremental bundle to update the other repository: |
Junio C Hamano | 6ac2f14 | 2007-03-01 01:24:56 | [diff] [blame] | 260 | |
Junio C Hamano | a3bb6eb | 2009-02-05 01:26:33 | [diff] [blame] | 261 | ---------------- |
| 262 | machineA$ cd R1 |
Junio C Hamano | 6116912 | 2009-02-09 18:05:49 | [diff] [blame] | 263 | machineA$ git bundle create file.bundle lastR2bundle..master |
Junio C Hamano | a3bb6eb | 2009-02-05 01:26:33 | [diff] [blame] | 264 | machineA$ git tag -f lastR2bundle master |
| 265 | ---------------- |
| 266 | |
Junio C Hamano | 1de7572 | 2009-03-26 08:39:38 | [diff] [blame] | 267 | You then transfer the bundle to the other machine to replace |
| 268 | /home/me/tmp/file.bundle, and pull from it. |
Junio C Hamano | a3bb6eb | 2009-02-05 01:26:33 | [diff] [blame] | 269 | |
| 270 | ---------------- |
| 271 | machineB$ cd R2 |
| 272 | machineB$ git pull |
| 273 | ---------------- |
| 274 | |
| 275 | If you know up to what commit the intended recipient repository should |
Junio C Hamano | 1de7572 | 2009-03-26 08:39:38 | [diff] [blame] | 276 | have the necessary objects, you can use that knowledge to specify the |
Junio C Hamano | d2e3056 | 2021-08-24 23:21:51 | [diff] [blame] | 277 | prerequisites, giving a cut-off point to limit the revisions and objects that go |
Junio C Hamano | 2db3e75 | 2010-09-03 21:33:06 | [diff] [blame] | 278 | in the resulting bundle. The previous example used the lastR2bundle tag |
Junio C Hamano | 1de7572 | 2009-03-26 08:39:38 | [diff] [blame] | 279 | for this purpose, but you can use any other options that you would give to |
Junio C Hamano | a3bb6eb | 2009-02-05 01:26:33 | [diff] [blame] | 280 | the linkgit:git-log[1] command. Here are more examples: |
| 281 | |
Junio C Hamano | 1de7572 | 2009-03-26 08:39:38 | [diff] [blame] | 282 | You can use a tag that is present in both: |
Junio C Hamano | a3bb6eb | 2009-02-05 01:26:33 | [diff] [blame] | 283 | |
| 284 | ---------------- |
| 285 | $ git bundle create mybundle v1.0.0..master |
| 286 | ---------------- |
| 287 | |
Junio C Hamano | d2e3056 | 2021-08-24 23:21:51 | [diff] [blame] | 288 | You can use a prerequisite based on time: |
Junio C Hamano | a3bb6eb | 2009-02-05 01:26:33 | [diff] [blame] | 289 | |
| 290 | ---------------- |
| 291 | $ git bundle create mybundle --since=10.days master |
| 292 | ---------------- |
| 293 | |
Junio C Hamano | 1de7572 | 2009-03-26 08:39:38 | [diff] [blame] | 294 | You can use the number of commits: |
Junio C Hamano | a3bb6eb | 2009-02-05 01:26:33 | [diff] [blame] | 295 | |
| 296 | ---------------- |
| 297 | $ git bundle create mybundle -10 master |
| 298 | ---------------- |
| 299 | |
| 300 | You can run `git-bundle verify` to see if you can extract from a bundle |
Junio C Hamano | d2e3056 | 2021-08-24 23:21:51 | [diff] [blame] | 301 | that was created with a prerequisite: |
Junio C Hamano | a3bb6eb | 2009-02-05 01:26:33 | [diff] [blame] | 302 | |
| 303 | ---------------- |
| 304 | $ git bundle verify mybundle |
| 305 | ---------------- |
| 306 | |
| 307 | This will list what commits you must have in order to extract from the |
Junio C Hamano | 1de7572 | 2009-03-26 08:39:38 | [diff] [blame] | 308 | bundle and will error out if you do not have them. |
Junio C Hamano | a3bb6eb | 2009-02-05 01:26:33 | [diff] [blame] | 309 | |
| 310 | A bundle from a recipient repository's point of view is just like a |
Junio C Hamano | 1de7572 | 2009-03-26 08:39:38 | [diff] [blame] | 311 | regular repository which it fetches or pulls from. You can, for example, map |
| 312 | references when fetching: |
Junio C Hamano | a3bb6eb | 2009-02-05 01:26:33 | [diff] [blame] | 313 | |
| 314 | ---------------- |
| 315 | $ git fetch mybundle master:localRef |
| 316 | ---------------- |
| 317 | |
Junio C Hamano | 2db3e75 | 2010-09-03 21:33:06 | [diff] [blame] | 318 | You can also see what references it offers: |
Junio C Hamano | a3bb6eb | 2009-02-05 01:26:33 | [diff] [blame] | 319 | |
| 320 | ---------------- |
| 321 | $ git ls-remote mybundle |
| 322 | ---------------- |
Junio C Hamano | 6ac2f14 | 2007-03-01 01:24:56 | [diff] [blame] | 323 | |
Junio C Hamano | 04495a1 | 2022-08-18 21:13:08 | [diff] [blame] | 324 | FILE FORMAT |
| 325 | ----------- |
| 326 | |
| 327 | See linkgit:gitformat-bundle[5]. |
| 328 | |
Junio C Hamano | 6ac2f14 | 2007-03-01 01:24:56 | [diff] [blame] | 329 | GIT |
| 330 | --- |
Junio C Hamano | f7c042d | 2008-06-06 22:50:53 | [diff] [blame] | 331 | Part of the linkgit:git[1] suite |