From 4ca4cf3c57f977978ab652f9fdbec7b626adc982 Mon Sep 17 00:00:00 2001 From: Ryan Kavanagh Date: Fri, 1 Jun 2018 13:52:40 -0400 Subject: Add a hook to make sure we don't accidentally commit a password --- .githooks/post-commit | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 .githooks/post-commit (limited to '.githooks/post-commit') diff --git a/.githooks/post-commit b/.githooks/post-commit new file mode 100755 index 0000000..5752673 --- /dev/null +++ b/.githooks/post-commit @@ -0,0 +1,9 @@ +#!/bin/sh + +if [ $(git diff -G PASS -i HEAD~1..HEAD | wc -l) != 0 ]; then + echo "#######################################################" + echo "# You committed something containing the string PASS. #" + echo "# Please make sure this is safe before pushing. #" + echo "#######################################################" + git diff -G PASS -i HEAD~1..HEAD +fi -- cgit v1.2.3