Skip to content

Instantly share code, notes, and snippets.

@un1ko85
Created May 10, 2013 06:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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