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.
I found an answer to my question. In case it may help somebody...
I just created a
commit-msg
file in.git/hooks
containingEach user needs to have a
commit-msg
file inside.git/hooks
. Then, as a solution, I addedcommit-msg
to the project folder (so I can pull this) with another file calledcommit-msg-hook.sh
containing:I welcome any advice to improve what I've done. Thanks.