git bundle create.
--- a/git.rst Mon Nov 28 01:04:47 2022 +0200
+++ b/git.rst Mon Nov 28 22:54:05 2022 +0200
@@ -608,13 +608,16 @@
Backup
======
-Create bundle::
+Create a bundle (a single file with specified Git objects, ``--all`` for complete history)::
- $ git bundle create $BUNDLE_FILE --all
+ $ git bundle create $REPO.bundle --all
Recreate repository from bundle::
- $ git clone $BUNDLE_FILE $REPO_PATH
+ $ git clone $REPO.bundle $REPO_DIR
+
+.. note:: ``git init; git bundle unbundle $BUNDLE`` doesn't recreate refs, you need to use ``git
+ clone`` instead.
Or clone without checking out working directory::