Created
October 25, 2018 03:54
-
-
Save kyubuns/9a23b29a48acf1c5a48249cdbf00f6cb to your computer and use it in GitHub Desktop.
gitのpre-commitでコミットしたらいけないコードを防ぐやつ
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
| if git commit -v --dry-run | grep 'no commit' > /dev/null 2>&1 | |
| then | |
| echo "Trying to commit non-committable code." | |
| exit 1 | |
| else | |
| exit 0 | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment