Skip to content

Instantly share code, notes, and snippets.

@ashsmith
Created September 1, 2012 21:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ashsmith/3588671 to your computer and use it in GitHub Desktop.
Save ashsmith/3588671 to your computer and use it in GitHub Desktop.
Git push to server, remote repo hook to automatically update a website's filesystem
#!/bin/sh
WEBDIR=/var/www/mysite.com
GIT_WORK_TREE=$WEBDIR git checkout -f
cd $WEBDIR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment