Created
May 30, 2017 07:06
-
-
Save ykyk1218/92a40231f231051a3bba0e270e57307f to your computer and use it in GitHub Desktop.
commitした時にbinding.pryがあると怒られるようにする
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/sh | |
| change_file_list=`git diff --cached --name-status | cut -c3-`; | |
| for FILE in $change_file_list | |
| do | |
| if grep -sq "binding\.pry" $FILE; then | |
| echo "binding.pry、はいってますよ。${FILE}" | |
| exit 1 | |
| fi | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
.git/hooks/pre-commit
chmod +x .git/hooks/pre-commit
で動作しました!