In the remote server I have a post-receive hook set up in order to make a git checkout of my repository:
#!/bin/sh GIT_WORK_TREE=/var/www/ git
Also remember to check permission of root directory itself!
You may find:
drwxr-xr-x 9 not-you www-data 4096 Aug 8 16:36 ./ -rw-r--r-- 1 you www-data 3012 Aug 8 16:36 README.txt -rw-r--r-- 1 you www-data 3012 Aug 8 16:36 UPDATE.txt
and 'permission denied' error will pop up.