Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>It may be worth changing your backup policy to ignore backing up the whole Git repository and instead backup a <a href="http://git-scm.com/docs/git-bundle" rel="nofollow noreferrer"><code>Git bundle</code></a>. From <a href="http://git-scm.com/2010/03/10/bundles.html" rel="nofollow noreferrer">Git's Little Bundle of Joy</a>:</p> <blockquote> <p>The bundle command will package up everything that would normally be pushed over the wire with a git push command into a binary file that you can email or sneakernet around, then unbundle into another repository.</p> </blockquote> <p>This approach is also discussed in <a href="https://stackoverflow.com/questions/1251713/backup-of-github-repo">Backup of github repo</a> and <a href="https://stackoverflow.com/questions/2129214/backup-a-local-git-repository">Backup a Local Git Repository</a>.</p> <p>A quick test of a local repo reveals the following creates a single file that contains everything one would typically want in a full repo backup:</p> <pre><code>$ git bundle create ../my.bundle --all </code></pre> <p>Creating a clone from the bundle file is simply:</p> <pre><code>$ git clone my.bundle my-repo </code></pre> <p>Using <code>git ls-remote my.bundle</code> shows that all tags and branches are in the bundle.</p> <p>However, to backup things that are probably not in the bundle file (like configuration, hooks, grafts, alternates, etc.), I would take the backup a few steps further and backup the <a href="http://git-scm.com/docs/gitrepository-layout" rel="nofollow noreferrer">Git repository</a> (short the <code>objects</code>, <code>refs</code> and <code>logs</code> directories) and the bundle file (the contents of the <code>objects</code> and <code>refs</code> repository directories are in the bundle and not needed). Unless the bundle does contain these files; then you only need to backup the bundle.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload