Skip to content

Instantly share code, notes, and snippets.

@fearofcode
Created October 10, 2013 01:50
Show Gist options
  • Save fearofcode/6911813 to your computer and use it in GitHub Desktop.
Save fearofcode/6911813 to your computer and use it in GitHub Desktop.
#!/bin/sh
# rename pre-commit.sample in the hooks directory to pre-commit and replace its content with this
set_traces=`git grep "pdb.set_trace()"`
if [ ! -z "$set_traces" ] ; then
echo "You have pdb.set_trace() in your code! Commit aborted!"
echo $set_traces
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment