Skip to content

Instantly share code, notes, and snippets.

@cameron
Created February 25, 2016 00:09
Show Gist options
  • Save cameron/74ea60c788f8fe236931 to your computer and use it in GitHub Desktop.
Save cameron/74ea60c788f8fe236931 to your computer and use it in GitHub Desktop.
DONTCOMMIT pre-commit hook
MATCHES=$(grep -rn --exclude-dir=node_modules --exclude-dir=.git "DONTCOMMIT\|<<<<" .)
if [ $? == 0 ]; then
echo "remove DONTCOMMITs and conflicts before committing"
echo $MATCHES
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment