Created
June 13, 2017 16:29
-
-
Save erwstout/b9f90678cf7e55adc7decf92a38fa773 to your computer and use it in GitHub Desktop.
Deploy remote Git Repo
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
## - Create the repo on the server | |
mkdir repo && cd repo | |
mkdir site.git && cd site.git | |
git init --bare |
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
## - Set remote paths that we will be working with | |
#!/bin/sh | |
git --work-tree=/home/accountname/public_html/wp-content/themes/themename --git-dir=/home/accountname/repos/site.git checkout -f | |
## control - d to save and close | |
## - Then we need to set the permissions correctly | |
chmod +x post-receive |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment