Skip to content

Commit 5c8273d

Browse files
avargitster
authored andcommitted
bundle doc: rewrite the "DESCRIPTION" section
Rewrite the "DESCRIPTION" section for "git bundle" to start by talking about what bundles are in general terms, rather than diving directly into one example of what they might be used for. This changes documentation that's been substantially the same ever since the command was added in 2e0afaf (Add git-bundle: move objects and references by archive, 2007-02-22). I've split up the DESCRIPTION into that section and a "BUNDLE FORMAT" section, it briefly discusses the format, but then links to the technical/bundle-format.txt documentation. The "the user must specify a basis" part of this is discussed below in "SPECIFYING REFERENCES", and will be further elaborated on in a subsequent commit. So I'm removing that part and letting the mention of "revision exclusions" suffice. There was a discussion about whether to say anything at all about "thin packs" here[1]. I think it's good to mention it for the curious reader willing to read the technical docs, but let's explicitly say that there's no "thick pack", and that the difference shouldn't matter. 1. http://lore.kernel.org/git/[email protected] Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ebf3c04 commit 5c8273d

File tree

1 file changed

+41
-15
lines changed

1 file changed

+41
-15
lines changed

Documentation/git-bundle.txt

Lines changed: 41 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,47 @@ SYNOPSIS
1818
DESCRIPTION
1919
-----------
2020

21-
Some workflows require that one or more branches of development on one
22-
machine be replicated on another machine, but the two machines cannot
23-
be directly connected, and therefore the interactive Git protocols (git,
24-
ssh, http) cannot be used.
25-
26-
The 'git bundle' command packages objects and references in an archive
27-
at the originating machine, which can then be imported into another
28-
repository using 'git fetch', 'git pull', or 'git clone',
29-
after moving the archive by some means (e.g., by sneakernet).
30-
31-
As no
32-
direct connection between the repositories exists, the user must specify a
33-
basis for the bundle that is held by the destination repository: the
34-
bundle assumes that all objects in the basis are already in the
35-
destination repository.
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.
24+
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.
28+
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+
45+
Like the the packed archive format itself bundles can either be
46+
self-contained, or be created using exclusions.
47+
48+
Bundles created using revision exclusions are "thin packs" created
49+
using the `--thin` option to linkgit:git-pack-objects[1], and
50+
unbundled using the `--fix-thin` option to linkgit:git-index-pack[1].
51+
52+
There is no option to create a "thick pack" when using revision
53+
exclusions, users should not be concerned about the difference. By
54+
using "thin packs" bundles created using exclusions are smaller in
55+
size. That they're "thin" under the hood is merely noted here as a
56+
curiosity, and as a reference to other documentation
57+
58+
See link:technical/bundle-format.html[the `bundle-format`
59+
documentation] for more details and the discussion of "thin pack" in
60+
link:technical/pack-format.html[the pack format documentation] for
61+
further details.
3662

3763
OPTIONS
3864
-------

0 commit comments

Comments
 (0)