Created
February 27, 2017 21:26
-
-
Save 0xv/0f7004cf6b619f6015d173c6765e9ce6 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
cd /var | |
mkdir repo && cd repo | |
mkdir site.git && cd site.git | |
git init --bare | |
cd hooks | |
cat > post-receive | |
#!/bin/sh | |
git --work-tree=/var/www/domain.com --git-dir=/var/repo/site.git checkout -f | |
chmod +x post-receive | |
git remote add live ssh://[email protected]/var/repo/site.git |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment