Skip to content

Instantly share code, notes, and snippets.

@danielmelogpi
Created March 16, 2014 02:41
Show Gist options
  • Save danielmelogpi/9577800 to your computer and use it in GitHub Desktop.
Save danielmelogpi/9577800 to your computer and use it in GitHub Desktop.
This goes on the server bare git repository, in the hooks/ folder. It makes a checkout of the most recente working tree instance to the project published folder.
#!/bin/sh
GIT_WORK_TREE=/var/www/nginx/danielmelo git checkout -f
# http://toroid.org/ams/git-website-howto
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment