title: Automatically Sync Local Github Repository with Directory on Server
body: <p>I have been attempting to use hooks to automatically pull the updated repo from github to my remote web server. This is the code on the post-receive hook:</p>
  
  <pre><code>cd /home/[my username]/document_root/[github repo name]/
  git pull origin master
  </code></pre>
  
  <p>I expect this to run when there is a new commit from my development machine that syncs with the one on github, but it doesn't update the files inside of that repo directory. Any help is appreciated, but I am new to using git and github in general.</p>
  
  <p>EDIT: I tried to follow this tutorial but it still doesn't work.
  <a href="http://ryanflorence.com/deploying-websites-with-a-tiny-git-hook/" rel="nofollow">http://ryanflorence.com/deploying-websites-with-a-tiny-git-hook/</a></p>