Skip to content

Instantly share code, notes, and snippets.

@cookpete
Last active August 29, 2015 14:02
Show Gist options
  • Save cookpete/510112ff9cebb91d6651 to your computer and use it in GitHub Desktop.
Save cookpete/510112ff9cebb91d6651 to your computer and use it in GitHub Desktop.
mkdir DIR_NAME
cd DIR_NAME
git init --bare
echo -e '#!/bin/sh\nGIT_WORK_TREE=/var/sites/SITE_PATH/public_html/DIR_NAME git checkout -f' > hooks/post-receive
chmod +x hooks/post-receive
cd ..
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment