title: Keeping an auto-updating clone of a bare git repository
body: <h3>Here is what I did</h3>
  
  <pre><code>cd /git
  git init --bare repo
  </code></pre>
  
  <h3>What I want to do</h3>
  
  <p>I want an auto-updating non-bare clone of the repository to be available at a different location e.g. <code>/srv/web/</code>. What I mean is that everytime someone does a <code>git push</code> the contents in <code>/srv/web/</code> should automatically update. Similarly, if the git repository is reverted back, then the files in <code>/srv/web</code> should also revert to that.</p>