Browse Source

Created a git hook to catch the no-commit canary.

master
Zed A. Shaw 2 months ago
parent
commit
8e0034613d
  1. 9
      .git-hooks/pre-commit

9
.git-hooks/pre-commit

@ -0,0 +1,9 @@
#!/bin/sh
CANARY=$(git diff --cached | grep -w "bc38cc69-1f88-4c1e-b262-ab1b6621fc82")
if [ ! -z "$CANARY" ]; then
echo "You're checking in a secret file with canary bc38cc69-1f88-4c1e-b262-ab1b6621fc82 in it:"
echo $CANARY
exit 1
fi
Loading…
Cancel
Save