Last night I discovered Hostgator shared servers enable…

git

Last night, I discovered Hostgator shared servers enable git services.

Then I stumbled across this page: http://toroid.org/ams/git-website-howto

This page explains exactly how to automatically update a git repo on your local machine and, with one simple git push, puts the full changes live on your webserver.

From here, this page will show you how to create a fresh repository, and how to mirror that to the server.

Using “cat > hooks/post-receive”, you can very quickly specify where your document root is on the webserver, thanks to “GIT_WORK_TREE”.

Now all of this is completed, I can simply run a “git push web” and my local version of my webpage is updated onto the server. Very nice!