My current set up is as follows:
- I have a laptop in which I like to write my website's code
- I have a raspberry pi running Apache which will serve my website's code as long as it is in
/var/www/html
- I have clone a repository of my website onto the raspberry pi in Directory A.
I want to create a git hook so that when I pull my code the code updates in /var/www/html
I have tried creating both a post-merge
and post-receive
hook using the following code:
#!/bin/bash git --work-tree=/var/www/html --git-dir=DIRECTORY A
But it does not seem to work. Any ideas?