The following script outlines how we can use git-hooks for continuous deployment (when you push your git repository, it will automatically be deployed to the server).
Note, this script is heavily based on but slightly extends this gist, see also this explanation.
Basic idea: using git-hooks to copy the files on a target machine from a remote git repository to a specific target location.
For this, we need multiple components:
- On the target machine (the production server)