Skip to content

Instantly share code, notes, and snippets.

@bradym
Created November 5, 2015 19:18
Show Gist options
  • Save bradym/b08b77ebef513131cc6b to your computer and use it in GitHub Desktop.
Save bradym/b08b77ebef513131cc6b to your computer and use it in GitHub Desktop.
#!/bin/sh
for FILE in `git diff --name-only`; do
grep 'MYTODO' $FILE 2>&1 >/dev/null
if [ $? -eq 0 ]; then
echo $FILE ' contains MYTODO'
exit 1
fi
done
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment