I found this question which tells how to create a git hook to automatically pull updates to a folder Automatic git pull on server
Basically, it says to add a php file to the folder, then the hook will do an http request to execute the script.
My problem is that I am updating python scripts that are not in the /var/www folder, but rather in the /usr folder.
I don't want these files accessible via the web, so is there a way to execute a git pull
request on a remote server for a folder outside /var/www?