Skip to content

Instantly share code, notes, and snippets.

@raphaelyancey
Last active August 29, 2015 14:06
Show Gist options
  • Save raphaelyancey/0df67eb38cf090613501 to your computer and use it in GitHub Desktop.
Save raphaelyancey/0df67eb38cf090613501 to your computer and use it in GitHub Desktop.
Git post-receive deployment script
#!/bin/sh
# Name of the destination directory
NAME=deploy-test
echo "[+] Deploying..."
git --work-tree=/home/$NAME --git-dir=/home/git/repositories/$NAME.git checkout -f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment