@@ -23,8 +23,8 @@ the "offline" transfer of Git objects without an active "server"
23
23
sitting on the other side of the network connection.
24
24
25
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.
26
+ repository (`git bundle create <file> --all`) , and to relay the state of
27
+ the references in one repository to another.
28
28
29
29
Git commands that fetch or otherwise "read" via protocols such as
30
30
`ssh://` and `https://` can also operate on bundle files. It is
@@ -132,7 +132,7 @@ SPECIFYING REFERENCES
132
132
---------------------
133
133
134
134
Revisions must be accompanied by reference names to be packaged in a
135
- bundle.
135
+ bundle. Alternatively `--all` can be used to package all refs.
136
136
137
137
More than one reference may be packaged, and more than one set of prerequisite objects can
138
138
be specified. The objects packaged are those not contained in the
@@ -203,8 +203,6 @@ It is okay to err on the side of caution, causing the bundle file
203
203
to contain objects already in the destination, as these are ignored
204
204
when unpacking at the destination.
205
205
206
- If you want to match `git clone --mirror`, which would include your
207
- refs such as `refs/remotes/*`, use `--all`.
208
206
If you want to provide the same set of refs that a clone directly
209
207
from the source repository would get, use `--branches --tags` for
210
208
the `<git-rev-list-args>`.
@@ -321,6 +319,20 @@ You can also see what references it offers:
321
319
$ git ls-remote mybundle
322
320
----------------
323
321
322
+ DISCUSSION
323
+ ----------
324
+
325
+ A naive way to make a full backup of a repository is to use something to
326
+ the effect of `cp -a <repo> <destination>`. This is discouraged since
327
+ the repository could be written to during the copy operation. In turn
328
+ some files at `<destination>` could be corrupted.
329
+
330
+ This is why it is recommended to use Git tooling for making repository
331
+ backups, either with this command or with e.g. linkgit:git-clone[1].
332
+
333
+ See also linkgit:gitfaq[7], section "TRANSFERS" for a discussion of the
334
+ problems associated with file syncing across systems.
335
+
324
336
FILE FORMAT
325
337
-----------
326
338
0 commit comments