Skip to content

Instantly share code, notes, and snippets.

@viktor-evdokimov
Last active April 13, 2018 22:29
Show Gist options
  • Save viktor-evdokimov/cd79290aa66d68a362cd4d36fb206854 to your computer and use it in GitHub Desktop.
Save viktor-evdokimov/cd79290aa66d68a362cd4d36fb206854 to your computer and use it in GitHub Desktop.
pre-commit git hook to stop you from commiting binding.pry
#!/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