My git hook does not seem to be working. Namely a commit-msg hook from gerrit.
The commit-msg hook exist in <repo>/.git/hooks/ and has proper syntax.
My git hook does not seem to be working. Namely a commit-msg hook from gerrit.
The commit-msg hook exist in <repo>/.git/hooks/ and has proper syntax.
 
    
    Make sure your hook files are executable. If you use i.e. curl to download hooks, make sure you chmod +x them.
$ pwd
<repo>/.git/hooks
$ chmod +x commit-msg
If you use scp to get your hooks, the flag -p might set proper modes for you.
 
    
    Check this other answer. It could be that core.hooksPath has been set to another path than $GIT_DIR/hooks, making your hooks in that folder ignored.
