Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save todditron/d4817ae913e7d58bfed5200dc251a53f to your computer and use it in GitHub Desktop.
Save todditron/d4817ae913e7d58bfed5200dc251a53f to your computer and use it in GitHub Desktop.
Git post-receive hook for deploying on webfaction
# *** INSTRUCTIONS ********
# $ cd repo.git/hooks
# $ vi post-receive
# paste this and fix formatting since things always get funky pasting into VI
# ESC
# :wq
# $ chmod +x post-receive
# ***************************
#!/bin/sh
GIT_WORK_TREE=/home/USERNAME/webapps/APPNAME git checkout -f master
GIT_WORK_TREE=/home/USERNAME/webapps/APPNAME git reset --hard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment