Skip to content

Instantly share code, notes, and snippets.

@fzerorubigd
Created June 25, 2014 07:33
Show Gist options
  • Save fzerorubigd/a3aad2d9336fec53128f to your computer and use it in GitHub Desktop.
Save fzerorubigd/a3aad2d9336fec53128f to your computer and use it in GitHub Desktop.
Just if there is a change in a branch available Hook
#!/bin/bash
while read oldrev newrev refname
do
branch=$(git rev-parse --symbolic --abbrev-ref $refname)
if [ "staging" == "$branch" ]; then
git push staging #Whatever
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment