title: getting "fatal: not a git repository: '.'" when using post-update hook to execute 'git pull' on another repo
body: <p>I'm new to git so I apologize (and please correct me) if I misuse terminology here, but I'll do my best.</p>
  
  <p>I'm trying to set up a bare git repo (hub) and a development site working copy (prime) on a web server. I've tried to pattern it after <a href="http://joemaller.com/990/a-web-focused-git-workflow/" rel="noreferrer">this article</a>. I want the development working copy to be updated whenever the hub repo is pushed to. I'm under the impression that the proper hook for this is <code>post-update</code>, which I have created like so:</p>
  
  <pre><code>#!/bin/sh
  whoami
  cd /path/to/working-copy/
  RET=`git pull`
  echo $RET
  </code></pre>
  
  <h2>Update</h2>
  
  <p>When I push changes from my local repo to the bare hub I get the following output from the post-update script:</p>
  
  <pre><code>remote: sites
  remote: fatal: Not a git repository: '.'
  </code></pre>
  
  <p>However if I SSH into the server as user 'sites' and execute this script manually it works great Any ideas as to what might be going wrong with this hook or script?</p>