changeset 2505:5262c08480dc

Backup.
author Oleksandr Gavenko <gavenkoa@gmail.com>
date Sat, 20 Mar 2021 22:15:32 +0200
parents e101133a8a62
children 04649fd8a394
files git.rst
diffstat 1 files changed, 17 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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.
 ===================================