I have a git hook file
.git/hooks/commit-msg
that I would like everybody on the team to have. Can I add it to the reposity somehow?
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.
I think you can’t directly add the hook to the repository. However you can put the script in the normal tree structure and create a small script to link it to the hooks directory. If you have your
commit-msg-hook-scriptis at the root of your repository, you could create aninstall_commit_hook.sh, with something like this: