title: Simple git post-commit hook to copy committed files to a certain folder
body: <p>I would like to automatically copy the committed files to a certain folder so they can be viewed in a browser, but I would like to do this without having to create a bare repository that mirrors the main repository (as shown <a href="http://toroid.org/ams/git-website-howto">here</a>) and I would like this to happen on commit.</p>
  
  <p>Is there any simple way to create a hook that reads which files have been committed and copies them/updates them on a live webserver?</p>
  
  <p>For example: I have a folder named /example.com and a git repository. I want that when I commit index.html in the repository, the corresponding index.html file from /example.com to be updated with the contents of the committed file</p>