Skip to content

Instantly share code, notes, and snippets.

@3rdp
Last active April 16, 2021 15:22
Show Gist options
  • Save 3rdp/71ecae89de7ef2fa6dab658d2862d54d to your computer and use it in GitHub Desktop.
Save 3rdp/71ecae89de7ef2fa6dab658d2862d54d to your computer and use it in GitHub Desktop.
no commit comment check in pre-commit hook
# NO COMMIT ;)
for FILE in `git diff --name-only --cached` ; do
if grep -q 'NO COMMIT' $FILE
then
echo $FILE ' contains NO COMMIT!'
exit 1
fi
done
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment