Last active
August 29, 2015 13:57
-
-
Save owainlewis/9549117 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Setup our folder structure | |
| cd /var | |
| sudo mkdir -p fshionable | |
| sudo mkdir -p fshionable/site.git | |
| cd /var/fshionable/site.git | |
| # Create a bare git repo to receive our push | |
| git init --bare | |
| # Create a hook that runs when we push our code | |
| cd /var/fshionable/site.git/hooks/ | |
| sudo touch post-receive | |
| sudo nano post-receive | |
| # Add this to your post-receive hook | |
| #!/bin/sh | |
| git --work-tree=/var/www/fshionable --git-dir=/var/fshionable/site.git checkout -f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment