Skip to content

Instantly share code, notes, and snippets.

@javifr
Created February 24, 2013 17:28
Show Gist options
  • Save javifr/5024704 to your computer and use it in GitHub Desktop.
Save javifr/5024704 to your computer and use it in GitHub Desktop.
post-receive ( hook de un repo git, sincro de ramas develop y master a stages de preproducción y producción )
#!/bin/sh
echo "=============================="
echo "Pull del central repo "
echo "=============================="
echo "=========== PRO ============="
cd ~/www/projectroot
unset GIT_DIR
git pull origin master
git reset --hard
echo "=========== PRE ============="
cd ~/www/projectroot/pre
unset GIT_DIR
git pull origin develop
git reset --hard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment