Use Git to deploy changes to web servers
Suppose you have {HOME}/html
as the web root and {HOME}/html.git
as a corresponding bare repo. Now edit {HOME}/html.git/hooks/post-update
as
target=${HOME}/html
cd $target
unset GIT_DIR
git pull
DONE!
Now you can work in your local Git repo, whose remote is user@remote_machine:{HOME}/html.git
. After any modification, commit it and fire a git push
. Your remote website is update!
This is what I do on the GoDaddy server ( http://hupili.net/ ).
More details: https://gist.github.com/hupili/7767420
Written by HU, Pili
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Push
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#