title: Is "git push --mirror" sufficient for backing up my repository?
body: <p>I'm a solo developer, working in a local Git repository. For backups, I want to send an exact copy of that repository off to another server.</p>
  
  <p>Is it sufficient to do this?</p>
  
  <pre><code>git push --mirror
  </code></pre>
  
  <p>I'm asking because I can sometimes run this command two or three times before Git tells me "Everything up-to-date", so apparently it's not an exact mirror. It seems to be re-pushing tracking branches...?</p>
  
  <pre><code>$ git push --mirror
  Counting objects: 42, done.
  Delta compression using up to 8 threads.
  Compressing objects: 100% (30/30), done.
  Writing objects: 100% (30/30), 5.09 KiB, done.
  Total 30 (delta 17), reused 0 (delta 0)
  To ssh://my/repo/url
     c094a10..0eedc92  mybranch -&gt; mybranch
  $ git push --mirror
  Total 0 (delta 0), reused 0 (delta 0)
  To ssh://my/repo/url
     c094a10..0eedc92  origin/mybranch -&gt; origin/mybranch
  $ git push --mirror
  Everything up-to-date
  </code></pre>
  
  <p>What is happening, and is this a good strategy?</p>
  
  <p>Edit: I don't like to use something like <code>git bundle</code> or <code>.tar.bz2</code> archives, because I'd like the backup to be an accessible working copy. Since my backup server is connected to the net and always on, this is a nice way to access the repository when I'm on the road.</p>