Skip to content

Instantly share code, notes, and snippets.

@oldpatricka
Last active February 6, 2017 14:35
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oldpatricka/9914747 to your computer and use it in GitHub Desktop.
Save oldpatricka/9914747 to your computer and use it in GitHub Desktop.
Pre-commit hook to check for fixes or todos
#!/bin/sh
. git-sh-setup # for die
git-diff-index -p -M --cached HEAD -- | grep '^+' |
egrep 'TODO|FIXME|PDA' && die Blocking commit because string TODO/FIXME/PDA detected in patch
:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment