Skip to content

Commit 0e40a73

Browse files
PhilipOakleygitster
authored andcommitted
Doc: Bundle file usage
Improve the command description, including paragraph spacing. Git URLs can accept bundle files for fetch, pull and clone, include in that section. Include git clone in the bundle usage description. Correct the quoting of <git-rev-list-args>. Detail the <git-rev-list-args> options for cloning a complete repo. Signed-off-by: Philip Oakley <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5fa0f52 commit 0e40a73

File tree

2 files changed

+20
-6
lines changed

2 files changed

+20
-6
lines changed

Documentation/git-bundle.txt

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,14 @@ DESCRIPTION
2020
Some workflows require that one or more branches of development on one
2121
machine be replicated on another machine, but the two machines cannot
2222
be directly connected, and therefore the interactive Git protocols (git,
23-
ssh, http) cannot be used. This command provides support for
24-
'git fetch' and 'git pull' to operate by packaging objects and references
25-
in an archive at the originating machine, then importing those into
26-
another repository using 'git fetch' and 'git pull'
27-
after moving the archive by some means (e.g., by sneakernet). As no
23+
ssh, http) cannot be used.
24+
25+
The 'git bundle' command packages objects and references in an archive
26+
at the originating machine, which can then be imported into another
27+
repository using 'git fetch', 'git pull', or 'git clone',
28+
after moving the archive by some means (e.g., by sneakernet).
29+
30+
As no
2831
direct connection between the repositories exists, the user must specify a
2932
basis for the bundle that is held by the destination repository: the
3033
bundle assumes that all objects in the basis are already in the
@@ -35,7 +38,7 @@ OPTIONS
3538

3639
create <file>::
3740
Used to create a bundle named 'file'. This requires the
38-
'git-rev-list-args' arguments to define the bundle contents.
41+
'<git-rev-list-args>' arguments to define the bundle contents.
3942

4043
verify <file>::
4144
Used to check that a bundle file is valid and will apply
@@ -92,6 +95,14 @@ It is okay to err on the side of caution, causing the bundle file
9295
to contain objects already in the destination, as these are ignored
9396
when unpacking at the destination.
9497

98+
`git clone` can use any bundle created without negative refspecs
99+
(e.g., `new`, but not `old..new`).
100+
If you want to match `git clone --mirror`, which would include your
101+
refs such as `refs/remotes/*`, use `--all`.
102+
If you want to provide the same set of refs that a clone directly
103+
from the source repository would get, use `--branches --tags` for
104+
the `<git-rev-list-args>`.
105+
95106
EXAMPLES
96107
--------
97108

Documentation/urls.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ These two syntaxes are mostly equivalent, except the former implies
5353
--local option.
5454
endif::git-clone[]
5555

56+
'git clone', 'git fetch' and 'git pull', but not 'git push', will also
57+
accept a suitable bundle file. See linkgit:git-bundle[1].
58+
5659
When Git doesn't know how to handle a certain transport protocol, it
5760
attempts to use the 'remote-<transport>' remote helper, if one
5861
exists. To explicitly request a remote helper, the following syntax

0 commit comments

Comments
 (0)