Last active
December 16, 2015 10:39
-
-
Save webkonstantin/770b96f75ec4d0c8c225 to your computer and use it in GitHub Desktop.
post-receive example for non-bare 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
#!/bin/bash | |
set -e | |
# move to working tree dir | |
export GIT_DIR=$(cd ${GIT_DIR}; pwd) | |
GIT_WORK_TREE="${GIT_DIR}/.." | |
# update working dir | |
( | |
cd ${GIT_WORK_TREE} | |
pwd | |
git diff-index -R --name-status HEAD >&2 | |
git reset --hard HEAD | |
# composer install | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment