Skip to content

Instantly share code, notes, and snippets.

@davidnormo
Last active August 29, 2015 14:01
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidnormo/d03f42a24861b3f991fc to your computer and use it in GitHub Desktop.
Save davidnormo/d03f42a24861b3f991fc to your computer and use it in GitHub Desktop.
A pre-commit hook to remember to pray over your work
#!/bin/sh
#accept stdin input
exec < /dev/tty
#prompt user
read -p "Have you prayed? " -n 1 -r
#complete on new line
echo
#if yes then proceed, else fail
if [[ ! $REPLY =~ ^[Yy]$ ]]
then
exit 1
fi
exit 0
@davidnormo
Copy link
Author

$ touch .git/hooks/pre-commit

Copy contents of this gist into the newly created file, then:

$ chmod 755 .git/hooks/pre-commit

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