I have a system setup like this:
However no matter how I configure the shell environment (i.e. GIT_DIR and PWD) the git-pull command does NOT run when called by the hook. Literally there is NO output whatsoever.
My post-update looks like:
#!/bin/sh /git/Lunch.git/lunch-receive > lunch.txt
and my lunch-receive script looks like:
#!/bin/sh service myService stop cd /usr/lunch unset GIT_DIR git reset --hard # necessary or the pull fails git pull hub master # this line DOESN'T RUN grrrrr! chmod u+x *.sh chmod -R u+x bin service myService start
Finally, lunch.txt (the output) looks like
HEAD is now at 5956c0b [old commit message]