First of all, I am aware there are many similar questions out there, for example this one.
However, usually there are 2 main problems:
1.The hook file is not executable - checked. Here is the result of my ls -l
:
-rwxrwxr-x 1 root root 314 Sep 29 17:18 post-update
2.git working directory not set -checked. Here is my post-update hook script:
unset GIT_DIR
cd ..
echo "testing"
chmod -R 755 path/to/my/target/directory
And, even if my path is wrong, I would expect seeing the word testing
when I do git pull
, but nothing happens. I guess this means my post-update hook script is not run? What have I missed to make it running?