Skip to content

Instantly share code, notes, and snippets.

@jeremyroman
Created January 15, 2016 16:58
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 jeremyroman/6ba814e9de2c1204a765 to your computer and use it in GitHub Desktop.
Save jeremyroman/6ba814e9de2c1204a765 to your computer and use it in GitHub Desktop.
pre-commit hook
#!/bin/sh
if [[ "$(git symbolic-ref HEAD)" = "refs/heads/master" ]]; then
echo "Refusing to commit on master." >&2
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment