Backup.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Sat, 20 Mar 2021 22:15:32 +0200
changeset 2505 5262c08480dc
parent 2504 e101133a8a62
child 2506 04649fd8a394
Backup.
git.rst
--- a/git.rst	Tue Feb 23 18:40:36 2021 +0200
+++ b/git.rst	Sat Mar 20 22:15:32 2021 +0200
@@ -605,6 +605,23 @@
   $ git checkout 'master@{1979-02-26}'
   $ git checkout 'master@{1979-02-26 18:30:00}'
 
+Backup
+======
+
+Create bundle::
+
+  $ git bundle create $BUNDLE_FILE --all
+
+Recreate repository from bundle::
+
+  $ git clone $BUNDLE_FILE $REPO_PATH
+
+Or clone without checking out working directory::
+
+  $ git clone --mirror $ORIG $DEST
+
+Bundle is a single file, clone creates `.git` file hierarchy.
+
 Using git to work with SVN offline.
 ===================================