Last active
December 28, 2015 11:19
-
-
Save riebschlager/7492971 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
In local project folder: | |
git init | |
git add . | |
git commit -m "first" | |
On the server: | |
mkdir ~/repos/name-of-project.git | |
cd ~/repos/name-of-project.git | |
git init --bare | |
Create the hook: | |
pico ~/repos/name-of-project.git/hooks/post-update | |
GIT_WORK_TREE=~/path/to/site git checkout -f | |
chmod +x ~/repos/name-of-project.git/hooks/post-update | |
Local system: | |
git remote add website ssh://[email protected]/~/repos/name-of-project.git | |
git push -u website master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment