Skip to content

Instantly share code, notes, and snippets.

@akarasz
Created February 20, 2023 11:10
Show Gist options
  • Save akarasz/32179289684eaf574ad88f0dd07b4529 to your computer and use it in GitHub Desktop.
Save akarasz/32179289684eaf574ad88f0dd07b4529 to your computer and use it in GitHub Desktop.
fudge
dookie
butt
#!/bin/bash
CUSS_WORDS="/foo/bar/no-no.txt"
if git diff --cached | grep -if $CUSS_WORDS >/dev/null; then
echo "cuss words detected! abort commit"
exit 1
fi
if [ -f .git/hooks/pre-commit ]; then
.git/hooks/./pre-commit
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment