Take the 2-minute tour ×  I'm new to git so I apologize (and
please correct me) if I misuse terminology here, but I'll do my
best.  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 this article. 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 post-
update, which I have created like so:  cd /path/to/working-copy/
RET=`git pull` echo $RET   When I push changes from my local
repo to the bare hub I get the following output from the post-
update script:  remote: sites remote: fatal: Not a git
repository: '.'  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?
share|improve this question add comment  3 Answers  up vote 84
down vote accepted  Here is the script that ultimately worked. I
think the bit I was originally missing t