Created
November 21, 2011 21:19
-
-
Save nstielau/1383974 to your computer and use it in GitHub Desktop.
A post receive hook to sync remote non-bare repos
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
# First allow pushing to the checked-out branch on the remote repo: | |
# git config receive.denyCurrentBranch ignore | |
# Then add this to sync the working dir to the repo on receive: | |
GIT_WORK_TREE=/opt/titan GIT_DIR=/opt/titan/.git git reset --hard | |
# Then, on the local working dir, add the remote: | |
# git remote add test [email protected]:/opt/titan |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment