Skip to content

Instantly share code, notes, and snippets.

@nerdfiles
Created February 6, 2013 23:25
Show Gist options
  • Save nerdfiles/4726843 to your computer and use it in GitHub Desktop.
Save nerdfiles/4726843 to your computer and use it in GitHub Desktop.
Add as git pre-commit hook. $ ln -s ../../pre-commit.sh .git/hooks/pre-commit
#!/bin/bash
# no early morning pushes, go get some coffee
if [[ `date +%H`<5 ]]; then
if [[ `date +%H`>2 ]]; then
echo "!"
exit 1
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment