Last active
April 13, 2018 22:29
-
-
Save viktor-evdokimov/cd79290aa66d68a362cd4d36fb206854 to your computer and use it in GitHub Desktop.
pre-commit git hook to stop you from commiting binding.pry
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
exec 1>&2 | |
if test $(git diff --cached -S'binding.pry' --name-only | | |
LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 | |
then | |
cat <<\EOF | |
Remove biniding.pry | |
EOF | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment