Skip to content

Commit 4a2ba3e

Browse files
committed
Merge branch 'kh/bundle-docs' into seen
* kh/bundle-docs: Documentation/git-bundle.txt: discuss naïve backups Documentation/git-bundle.txt: mention --all in spec. refs Documentation/git-bundle.txt: mention full backup example
2 parents 46d33cf + e3367e4 commit 4a2ba3e

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

Documentation/git-bundle.txt

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ They can be used to create both incremental and full backups of a
2626
repository, and to relay the state of the references in one repository
2727
to another.
2828

29+
You can use `git bundle create <file> --all` to create a full backup of
30+
your repository.
31+
2932
Git commands that fetch or otherwise "read" via protocols such as
3033
`ssh://` and `https://` can also operate on bundle files. It is
3134
possible linkgit:git-clone[1] a new repository from a bundle, to use
@@ -132,7 +135,7 @@ SPECIFYING REFERENCES
132135
---------------------
133136

134137
Revisions must be accompanied by reference names to be packaged in a
135-
bundle.
138+
bundle. Alternatively `--all` can be used to package all refs.
136139

137140
More than one reference may be packaged, and more than one set of prerequisite objects can
138141
be specified. The objects packaged are those not contained in the
@@ -321,6 +324,20 @@ You can also see what references it offers:
321324
$ git ls-remote mybundle
322325
----------------
323326

327+
DISCUSSION
328+
----------
329+
330+
A naive way to make a full backup of a repository is to use something to
331+
the effect of `cp -a <repo> <destination>`. This is discouraged since
332+
the repository could be written to during the copy operation. In turn
333+
some files at `<destination>` could be corrupted.
334+
335+
This is why it is recommended to use Git tooling for making repository
336+
backups, either with this command or with e.g. linkgit:git-clone[1].
337+
338+
See also linkgit:gitfaq[1], section "TRANSFERS" for a discussion of the
339+
problems associated with file syncing across systems.
340+
324341
FILE FORMAT
325342
-----------
326343

0 commit comments

Comments
 (0)