Skip to content

Instantly share code, notes, and snippets.

@samsamm777
Last active December 24, 2015 16:19
Show Gist options
  • Save samsamm777/6827444 to your computer and use it in GitHub Desktop.
Save samsamm777/6827444 to your computer and use it in GitHub Desktop.
git post commit hook to export to htdocs folder
#!/bin/sh
unset GIT_INDEX_FILE
export GIT_WORK_TREE=/example.com/
export GIT_DIR=/home/whoever/development/web-project/.git/
git checkout -f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment