Skip to content

Instantly share code, notes, and snippets.

@un1ko85
Created May 10, 2013 06:52
Show Gist options
  • Save un1ko85/5552821 to your computer and use it in GitHub Desktop.
Save un1ko85/5552821 to your computer and use it in GitHub Desktop.
git hooks per branch
if [ `git rev-parse --abbrev-ref HEAD` == "development" ]; then
echo "development-script"
elif [ `git rev-parse --abbrev-ref HEAD` == "staging" ]; then
echo "staging-script"
elif [ `git rev-parse --abbrev-ref HEAD` == "production" ]; then
echo "production-script"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment