Skip to content

Instantly share code, notes, and snippets.

@mnalis
mnalis / pre-commit
Created October 12, 2020 17:19 — forked from kuy/pre-commit
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