@@ -23,8 +23,9 @@ the "offline" transfer of Git objects without an active "server"
sitting on the other side of the network connection.
They can be used to create both incremental and full backups of a
-repository (`git bundle create <file> --all`), and to relay the state of
-the references in one repository to another.
+repository (see the "full backup" example in "EXAMPLES"), and to relay
+the state of the references in one repository to another (see the second
+example).
Git commands that fetch or otherwise "read" via protocols such as
`ssh://` and `https://` can also operate on bundle files. It is
@@ -34,8 +35,6 @@ contained within it with linkgit:git-ls-remote[1]. There's no
corresponding "write" support, i.e.a 'git push' into a bundle is not
supported.
-See the "EXAMPLES" section below for examples of how to use bundles.
-
BUNDLE FORMAT
-------------
@@ -214,8 +213,27 @@ bundle.
EXAMPLES
--------
-Assume you want to transfer the history from a repository R1 on machine A
-to another repository R2 on machine B.
+We'll discuss two cases:
+
+1. Taking a full backup of a repository
+2. Transfer the history of a repository to another machine when the two
+ machines have no direct connection
+
+First let's consider a full backup of the repository. The following
+command will take a full backup of the repository in the sense that all
+refs are included in the bundle (except `refs/stash`, i.e. the stash):
+
+----------------
+$ git bundle create <file> --all
+----------------
+
+But note again that this is only for the refs, i.e. you will only
+include refs and commits reachable from those refs. You will not
+include other local state, such as the contents of the index, working
+tree, per-repository configuration, hooks, etc.
+
+For the next example, assume you want to transfer the history from a
+repository R1 on machine A to another repository R2 on machine B.
For whatever reason, direct connection between A and B is not allowed,
but we can move data from A to B via some mechanism (CD, email, etc.).
We want to update R2 with development made on the branch master in R1.
@@ -323,12 +341,16 @@ DISCUSSION
----------
A naive way to make a full backup of a repository is to use something to
-the effect of `cp -a <repo> <destination>`. This is discouraged since
+the effect of `cp -r <repo> <destination>`. This is discouraged since
the repository could be written to during the copy operation. In turn
some files at `<destination>` could be corrupted.
This is why it is recommended to use Git tooling for making repository
backups, either with this command or with e.g. linkgit:git-clone[1].
+But keep in mind that these tools will not help you backup state other
+than refs and commits. In other words they will not help you backup
+contents of the index, working tree, per-repository configuration,
+hooks, etc.
See also linkgit:gitfaq[7], section "TRANSFERS" for a discussion of the
problems associated with file syncing across systems.