I try to add a new pre-commit in myrepo/.git/hooks/pre-commit. How come I don’t see this pre-commit new file when I run
git status
Some git configuration or setting I need to turn on?
THanks
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.
Hooks and other files in the
.gitdirectory cannot be version controlled. You can put the hook script somewhere outside of the.gitdirectory to have it version controlled, then either symlink or copy it into the hooks directory to have it actually be used.