-
-
Save itsbalamurali/8583766 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
mkdir ~/git/website.git && ~/git/cd website.git | |
git init --bare | |
mkdir ~/webapps/website | |
git config core.bare false | |
git config core.worktree /home/rafi/webapps/website ; NO TRAILING SLASH!!! Will screw up things real bad. | |
git config receive.denycurrentbranch ignore | |
; create a hook | |
cat > hooks/post-receive | |
#!/bin/sh | |
git checkout -f | |
; make it executable | |
chmod +x hooks/post-receive | |
; on client | |
git remote add web user@service:git/website.git | |
git push web +master:refs/heads/master | |
; to update worktree submodules | |
git --git-dir=~/git/website.git submodule update --init |
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
#!/bin/sh | |
git checkout -f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment