Created
September 23, 2010 08:56
-
-
Save priithaamer/593362 to your computer and use it in GitHub Desktop.
Git post-receive file to update contents in another directory on the same server.
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 | |
# | |
# An example hook script to prepare a packed repository for use over | |
# dumb transports. | |
# | |
# To enable this hook, rename this file to "post-update". | |
WORKDIR="/some/git/repo/workdir" | |
export GIT_DIR=$WORKDIR/.git | |
pushd $WORKDIR > /dev/null | |
git pull | |
popd > /dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment