title: GIT web deployment: post-receive hook runs, but files not changing in web-root
body: <p>I am using <a href="https://gist.github.com/noelboss/3fe13927025b89757f8fb12e9066f2fa" rel="nofollow noreferrer">this gist's</a> guidelines for setting up automated deployment for my organization's website. The post-receive hook seems to be running, but the actual files in my site's web root are not being updated to reflect the changes that I push to the server. My post-receive hook is:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>#!/bin/bash
  while read oldrev newrev ref
  do
      # only checking out the master (or whatever branch you would like to deploy)
      if [[ $ref =~ .*/master$ ]];
      then
          echo "Master ref received.  Deploying master branch to production..."
          git --work-tree=/home/sites/3a/5/5b0bf591fd/public_html/ --git-dir=/home/sites/3a/5/5b0bf591fd/annapoliscodeandcoffee.git/ checkout -f
      else
          echo "Ref $ref successfully received.  Doing nothing: only the master branch may be deployed on this server."
      fi
  done</code></pre>
  </div>
  </div>
  </p>
  
  <p>I am not sure what is going wrong.  Is it possible that this has to do with my public_html folder's chmod permissions? They are currently set as -rw-r--r-- for all files located there.</p>
  
  <p>Also, in case it is relevant, the hosting service I am using is Ecowebhosting.co.uk.</p>