Skip to content

Instantly share code, notes, and snippets.

@Ry4an
Created February 13, 2014 15:57
Show Gist options
  • Save Ry4an/8977721 to your computer and use it in GitHub Desktop.
Save Ry4an/8977721 to your computer and use it in GitHub Desktop.
Put this in your repo's www/.git/hooks as pre-commit to make sure you can't commit with 'KILL ME' in a line
#!/bin/sh
#
if git diff --cached | grep --quiet 'KILL ME' ; then
echo FORGOT TO REMOVE KILL ME
exit 1
fi
@xtoss
Copy link

xtoss commented Mar 15, 2014

You won't be able to modify a line with an existing KILL ME as well, not even the lines around it.
Now I know how to protect my code :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment