aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorKristoffer Haugsbakk <code@khaugsbakk.name>2024-11-16 15:54:54 +0100
committerJunio C Hamano <gitster@pobox.com>2024-11-18 09:56:26 +0900
commit820fd1a5694b8d96609590163088d3f14731b565 (patch)
treec855f978c7bd9e4a197dc34f207e917e81a966cd /Documentation
parentDocumentation/git-bundle.txt: mention --all in spec. refs (diff)
downloadgit-820fd1a5694b8d96609590163088d3f14731b565.tar.gz
git-820fd1a5694b8d96609590163088d3f14731b565.zip
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 <code@khaugsbakk.name> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/git-bundle.txt18
1 files changed, 18 insertions, 0 deletions
diff --git a/Documentation/git-bundle.txt b/Documentation/git-bundle.txt
index eaa16fc4b8..504b8a8143 100644
--- a/Documentation/git-bundle.txt
+++ b/Documentation/git-bundle.txt
@@ -344,6 +344,24 @@ You can also see what references it offers:
$ git ls-remote mybundle
----------------
+DISCUSSION
+----------
+
+A naive way to make a full backup of a repository is to use something to
+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, the stash, per-repository
+configuration, hooks, etc.
+
+See also linkgit:gitfaq[7], section "TRANSFERS" for a discussion of the
+problems associated with file syncing across systems.
+
FILE FORMAT
-----------