Skip to content

Instantly share code, notes, and snippets.

@shotasenga
Created September 14, 2013 02:43
Show Gist options
  • Save shotasenga/6558405 to your computer and use it in GitHub Desktop.
Save shotasenga/6558405 to your computer and use it in GitHub Desktop.
Git pre-commit hook. user.name, user.email がローカルにセットされていなければコミットさせない。
#!/bin/sh
## fork from http://qiita.com/uasi/items/a340bb487ec07caac799
if [ -z "`git config --local user.name`" ]; then
echo "fatal: user.name is not set locally"
exit 1
fi
if [ -z "`git config --local user.email`" ]; then
echo "fatal: user.email is not set locally"
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment