Skip to content

Instantly share code, notes, and snippets.

View l-portet's full-sized avatar
🤙

Lucas Portet l-portet

🤙
View GitHub Profile
@l-portet
l-portet / gist:28882743b683618e599609c9193b29aa
Last active November 8, 2018 15:28 — forked from guilherme/gist:9604324
Git pre-commit hook that detects if the developer forget to remove all the javascript debugger before commit.
#!/bin/sh
# Redirect output to stderr.
exec 1>&2
# enable user input
exec < /dev/tty
debugregexp='debugger'
# CHECK
if test $(git diff --cached | grep $debugregexp | wc -l) != 0
then