I want to restrict the people whoever commits to have a specific commit message format, how do I do that?
For example: Pair_Name|Story_Number|Commit_Message
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There is a
pre-commit-msgorcommit-msghook, that you could use:Git repos come with sample hooks, e.g. the sample
commit-msghook undergit/hooks/commit-msg.samplecatches duplicate Signed-off-by lines.To enable a hook, don’t forget to make it executable.
Here’s some fictional example, which would only accept commit messages of the
london|120|something ...and the like:In usage: