Skip to content

Instantly share code, notes, and snippets.

@kuy
Last active November 10, 2021 03:52
Show Gist options
  • Save kuy/5d1151fd5897a9b84c06 to your computer and use it in GitHub Desktop.
Save kuy/5d1151fd5897a9b84c06 to your computer and use it in GitHub Desktop.
git: pre-commit hook script to prevent committing FIXME code
#!/bin/sh
matches=$(git diff --cached | grep -E '\+.*?FIXME')
if [ "$matches" != "" ]
then
echo "'FIXME' tag is detected."
echo "Please fix it before committing."
echo " ${matches}"
exit 1
fi
@fredRos
Copy link

fredRos commented Jun 18, 2018

Simply useful

@rfviolato
Copy link

Thanks for the snippet! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment