Skip to content

Instantly share code, notes, and snippets.

@jeremyroman
Created January 15, 2016 16:58
Show Gist options
  • Select an option

  • Save jeremyroman/6ba814e9de2c1204a765 to your computer and use it in GitHub Desktop.

Select an option

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