Skip to content

Instantly share code, notes, and snippets.

@abackstrom
Last active December 11, 2015 14:08
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 abackstrom/4611843 to your computer and use it in GitHub Desktop.
Save abackstrom/4611843 to your computer and use it in GitHub Desktop.
post-commit hook for @mikesusz
#!/bin/sh
# curl https://gist.github.com/raw/4611843/gistfile1.sh > .git/hooks/post-commit && chmod +x .git/hooks/post-commit
git diff-tree -p HEAD^ | grep livereload 2>&1 >/dev/null
if [ $? -eq 0 ] ; then
echo -e "\e[0;31m!!! Don't commit livereload stuff. --amend that commit.\e[0m"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment