Skip to content

Instantly share code, notes, and snippets.

@mirekfranc
Last active August 29, 2015 14:23
Show Gist options
  • Save mirekfranc/141c23ef704b21a72ca3 to your computer and use it in GitHub Desktop.
Save mirekfranc/141c23ef704b21a72ca3 to your computer and use it in GitHub Desktop.
post-receive git hook
#!/usr/bin/bash
# rename to hooks/post-receive
# chmod u+x hooks/post-receive
read -r branch
if [[ $branch == *master ]]
then
# do something if somebody pushed something into master
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment