Skip to content

Instantly share code, notes, and snippets.

@shadowhand
Created December 5, 2011 20:14
Show Gist options
  • Save shadowhand/1435163 to your computer and use it in GitHub Desktop.
Save shadowhand/1435163 to your computer and use it in GitHub Desktop.
#!/bin/bash
while read oldish newish ref; do
branch=$(echo "$ref" | cut -d"/" -f3-)
done
case "$branch" in
"live")
git --work-tree=/var/www/dylanstestserver.com/ checkout -f $branch
echo 'Changes pushed live.'
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment