Calling 'git pull' from a git post-update hook

Viewed 16022

I have a central git repo set up using gitolite.

I want to set up a hook such that whenever a user pushes to the repo, it performs a pull elsewhere followed by some automated testing.

So far, I only want to it perform the pull.

In the hooks directory I created the following script names post-update:

#!/bin/sh  
cd /home/git/www/epicac
git pull

When I invoke this script using ./post-update, it does exactly what I want.

However, whenever it's invoked automatically as I hook, I get: fatal: Not a git repository: '.'

Any idea why this might be happening?

4 Answers
Related