Created
November 17, 2015 20:07
-
-
Save tdhsmith/0c39400ffe8e3cd8b0a3 to your computer and use it in GitHub Desktop.
Git pre-commit username check
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ -z "$(git config user.name)" ]]; then | |
echo "Git username must be defined to commit!" | |
echo "(Are you running inside Vagrant/Homestead?)" | |
echo | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment