Skip to content

Instantly share code, notes, and snippets.

@jlecour
Created October 31, 2013 10:19
Show Gist options
  • Save jlecour/7247390 to your computer and use it in GitHub Desktop.
Save jlecour/7247390 to your computer and use it in GitHub Desktop.
Git Hooks (must be executable)
#!/bin/sh
if [[ `git symbolic-ref HEAD` == "refs/heads/master" ]]
then
echo "You cannot commit in master!"
exit 1
fi
#!/bin/sh
set -e
.git/hooks/_no_commit_on_master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment