Created
November 2, 2015 22:56
-
-
Save juemura/d938bd44d57901e4b9cc to your computer and use it in GitHub Desktop.
this is the post-receive in hooks in the remote server (old)
This file contains hidden or 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 | |
# | |
docroot="/var/www/html" | |
while read oldrev newrev ref | |
do | |
branch=`echo $ref | cut -d/ -f3` | |
if [ "master" == "$branch" ]; then | |
git --work-tree=$docroot checkout -f $branch | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment