Git commit hook - How to use the commit-msg hook to check for string in message?
问题 I need to make a commit-msg hook to check if the commit message contains "app.asana" in any part of this. I searched some references and documentation and I know I need to use the commit-msg for this. I have to make this using Perl or Bash. Does anybody has a clue about this or somewhere I can look more examples to learn how to do it?? Thank you. 回答1: I found an answer to my question. In case it may help somebody... I just created a commit-msg file in .git/hooks containing #!/bin/sh test -n "