Last active
April 7, 2018 06:40
-
-
Save meain/4a31548d87dd0c2ae3d3e822d4400751 to your computer and use it in GitHub Desktop.
Make commit message have the format `[for] commit message`
This file contains 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 | |
test "" = "$(cat "$1" | head -n 1 | grep -v '^\[.*\]\ .*')" || { | |
echo >&2 "Commit message format is: [git] added new commit message hook" | |
exit 1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment