eddard.stark eddard.stark - 1 year ago 110
Bash Question

git hook post-receive not working

I trying to deploy some PHP code to the server with Git. I am using a GoDaddy server. I have created the bare repository. In the

folder, I created a
file and wrote the following code in it.

GIT_WORK_TREE=/home/domain/public_html/website git checkout -f

I want the git repo to move the source code that I have just pushed to the website directory in
. I changed the permission to

However, my
directory still remains empty. What should I do?

Answer Source

Perhaps it's because you spelled "post-recieve" wrong? It should be post-receive (note the i and e after the c).

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download