1

Trying to do git pull a directory with a post-receive script. Currently all my script does is the following:

echo 'Testing post-receive hook'
cd ~/www/test.com/laravel
pwd
git pull
cp -a ~/www/test.com/laravel/public/. ~/www/test.com/public_html/

the problem is that when I hit this script it returns remote: fatal: not a git repository: '.' however, if I manually go into ~/www/test.com/laravel and do a git pull it works? any ideas would be very helpful.

m33bo
  • 1,334
  • 1
  • 17
  • 34

1 Answers1

0

Answer found git post-receive not working correctly You have to Unset the git directory with unset GIT_DIR before you call git pull

m33bo
  • 1,334
  • 1
  • 17
  • 34