Skip to content

Instantly share code, notes, and snippets.

@chrisjhoughton
Created January 27, 2014 11:53
Show Gist options
  • Select an option

  • Save chrisjhoughton/8647327 to your computer and use it in GitHub Desktop.

Select an option

Save chrisjhoughton/8647327 to your computer and use it in GitHub Desktop.
Git automated deployments. Add this file to the /hooks directory, after a git init --bare is created. Note you'll also need to: 1) run chmod +x hooks/post-receive to ensure it's executable, and 2) create the target directory.
#!/bin/sh
GIT_WORK_TREE=/home/myuser/public_html/wp-content/themes/mytheme git checkout -f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment