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?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…