Skip to content

Instantly share code, notes, and snippets.

@gillien
Created September 24, 2013 08:53
Show Gist options
  • Save gillien/6682111 to your computer and use it in GitHub Desktop.
Save gillien/6682111 to your computer and use it in GitHub Desktop.
Pre commit hook to avoid pushing a focus nor binding.pry http://git-scm.com/book/en/Customizing-Git-Git-Hooks
grep -rE ',.*:focus' spec/
focus_clean=$?
grep -rE '^ *(binding\.pry|debugger)' spec/ lib/ app/
pry_clean=$?
if [[ $focus_clean == "1" && $pry_clean == "1" ]]; then
exit 0;
else
exit 1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment