If you see the accepted answer in:
Aggregating and uglifying JavaScript in a Git pre-commit hook, you’ll see that I had to do a chmod +x on my pre-commit hook to get it to work.
Why is this not executable by Git by default?
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.
Because files are not executable by default; they must be set to be executable.
The sample files from a
git initare all executable; if it’s copied or renamed to a non-sample file, it will retain the original file’sxflag.New files will be created with current defaults. In your case, view those defaults with
umask:By default, new files won’t be
u+xunless explicitly set to be.