Skip to content

Instantly share code, notes, and snippets.

@rkjha
Created July 12, 2015 06:27
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save rkjha/8ca4ea5c00db52e92942 to your computer and use it in GitHub Desktop.
Git post-receive hook for deployment
#!/bin/sh
echo 'Deploying to the server............'
GIT_WORK_TREE=/home/example_user/example.com git checkout -f
echo '..............................Done.'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment