Skip to content

Instantly share code, notes, and snippets.

@holysugar
Last active December 10, 2015 19:48
Show Gist options
  • Select an option

  • Save holysugar/4483437 to your computer and use it in GitHub Desktop.

Select an option

Save holysugar/4483437 to your computer and use it in GitHub Desktop.
pre-commit hook: reject commit including p or pry
#!/bin/sh
git diff --cached | grep -E '^\+.*\bp(ry)?\b' && echo 'p or pry may exist.' && exit 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment