#!/bin/sh
# Make sure the email is set properly before committing the file
required="skay@gmail.com"
useremail=$(git config user.email)
# Check if the git config useremail DOES NOT MATCH your required
if [ "$useremail" != "$required" ]; then
echo "Error: user.email not set to \"$required\"" >&2
exit 1
fi
pre-commit
Great suggestion on the error message to be generic :-)