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 hooks
folder, I created a post-receive
file and wrote the following code in it.
#!/bin/sh
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 public_html
. I changed the permission to 0775
.
However, my website
directory still remains empty. What should I do?