Skip to content

Commit a8f3f5e

Browse files
LemmingAvalanchegitster
authored andcommitted
Documentation/git-bundle.txt: discuss naïve backups
It might be naïve to think that those who need this education would end up here in the first place. But I think it’s good to mention this high-level concept here on a command which provides a backup strategy. Signed-off-by: Kristoffer Haugsbakk <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent a81ea3e commit a8f3f5e

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

Documentation/git-bundle.txt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,24 @@ You can also see what references it offers:
337337
$ git ls-remote mybundle
338338
----------------
339339

340+
DISCUSSION
341+
----------
342+
343+
A naive way to make a full backup of a repository is to use something to
344+
the effect of `cp -r <repo> <destination>`. This is discouraged since
345+
the repository could be written to during the copy operation. In turn
346+
some files at `<destination>` could be corrupted.
347+
348+
This is why it is recommended to use Git tooling for making repository
349+
backups, either with this command or with e.g. linkgit:git-clone[1].
350+
But keep in mind that these tools will not help you backup state other
351+
than refs and commits. In other words they will not help you backup
352+
contents of the index, working tree, per-repository configuration,
353+
hooks, etc.
354+
355+
See also linkgit:gitfaq[7], section "TRANSFERS" for a discussion of the
356+
problems associated with file syncing across systems.
357+
340358
FILE FORMAT
341359
-----------
342360

0 commit comments

Comments
 (0)