Created
June 27, 2016 20:08
-
-
Save ph3b/ce9aeef815c176e3a6f9b58dd4897f7a to your computer and use it in GitHub Desktop.
This file contains 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
On remote: | |
1. $ git init --bare | |
2. $ touch ./hooks/post-receive | |
3. $ chmod +x ./hooks/post-receive | |
4. $ sudo nano ./hooks/post-receive | |
Paste | |
``` | |
#!/bin/bash | |
echo "Hello :) " | |
git --work-tree=/home/username/var/www/domain.com --git-dir=/home/username/repo/domain.git checkout -f | |
``` | |
On local: | |
$ git remote add live ssh://username@ip/home/username/repo/domain.git | |
$ git push live master | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment