We have a VPS on linode, and code hosted on gitHub. How do we setup so when we push to gitHub, it also pushes automatically to our linode server. We are using PHP on the lin
Maybe i'm out of context but i prefer to manually choose where to push from my command line eg: git push linode
To do this i create a repository container in my linode server and created a post-receive hook that checkouts my folder to the last pushed commit
Create a git repo container
mkdir /var/repo && cd /var/repo
git --bare init
Create the post-receive hook in /var/repo/hooks/
touch post-receive
nano post-receive
chmod +x post-receive
post-receive content
#!/bin/sh
git --work-tree=/var/www/ --git-dir=/var/repo checkout -f
On your local repository
git remote add linode root@
your code is now deployed