title: git post-receive hook not running
body: <p>I have a bare repo server-side, and I am able to successfully commit and push from my local machine. However, the post-receive hook is not running. Details:</p>
  
  <ul>
  <li>Using SSH as protocol</li>
  <li>I have renamed the standard "post-receive.sample" to "post-receive"</li>
  <li>This file has <code>-rwxr-xr-x</code> permissions</li>
  <li>The file is owned by the same user that owns the repo, which is the same SSH user that logs in and pushes</li>
  <li>The actual pushing goes fine; files are updated - it's just the hook that does not run</li>
  <li>I tried putting <code>echo "Some text"</code> before and after the hook, but this is not shown (see: <a href="https://stackoverflow.com/questions/5084100/post-commit-hook-not-running">Post Commit Hook Not Running</a>). </li>
  <li>Hook script is included below, although this appears not to be causing the problem</li>
  <li>Using git 1.7.0.4 on Ubuntu 10.04</li>
  </ul>
  
  <p>.</p>
  
  <pre><code>user@server:/home/repos/project1/hooks# cat post-receive
  #!/bin/sh
  echo "Hook is running..."
  export GIT_WORK_TREE=/home/web/project1/www/
  git checkout -f
  rm -rf /home/web/project1/www/temp/
  </code></pre>