title: Backup a GitHub repository
body: <p><strong>What is the best way to create a local backup of a git repository hosted on GitHub, given the following requirements?:</strong></p>
  
  <ol>
  <li><p>The local backup should be a bare repo.</p></li>
  <li><p>The backup should include all branches.</p></li>
  <li><p>It should be easy to (incrementally) update the backup.</p></li>
  </ol>
  
  <p>Basically, I want a perfect mirror, with the possibility to update easily. As such, the command</p>
  
  <pre><code>git clone --mirror git://github.com/...
  </code></pre>
  
  <p>comes to mind, but as far as I can tell, that doesn't allow for an easy update (I'd have to delete and recreate my local backup). Also, the mirror option for git clone seems quite recent, I don't have it on some of the systems I'm working on (which have slightly older versions of git running).</p>
  
  <p>What is your recommended solution for this kind of problem?</p>