Please share the listing of the .git/hooks folder from the repo. The checkbox is shown only when there are executable pre-commit or commit-msg hooks in the folder.
I ran into the same issue. The solution for me was to verify execute permissions on the hook files. When changed, the option you are looking for is enabled.
Aneelia I run Linux on my machine. Assuming you are too, look in your project's `.git/hooks` directory and change permission on the hook file you want to run i.e. `chmod 744 <hook_file_name>`. 744 permissions should match existing `.sample` hook files already in that directory. If you are on Windows, right click the same hook file, then properties, then set execute permissions. Hopefully this will work for your situation.
Finally I resolved my problem!! And the solution is very simple,just excute this command (if you use husky):
`chmod +x .husky/pre-commit`
remenber,must reopen the project in webstorm,than you will seen the "run git hooks"checkbox in your commit panel.
I found this solution because it apppears some hint when I commit some code, is shows "hint: The '.husky/pre-commit' hook was ignored because it's not set as executable."
Please share the listing of the
.git/hooks
folder from the repo. The checkbox is shown only when there are executablepre-commit
orcommit-msg
hooks in the folder.What if I use latest version of husky and hook executable is located under `.husky` folder?
Same here. And I do have runnable hooks in .git/hooks folder. But the checkbox is still not activated.
Same here, hooks are in .husky folder, no run git hooks checkbox.
Please react to this issue
I ran into the same issue. The solution for me was to verify execute permissions on the hook files. When changed, the option you are looking for is enabled.
edwinvelez hi! could you help please, how to verify permissions? and how to change them. thanks!
Aneelia I run Linux on my machine. Assuming you are too, look in your project's `.git/hooks` directory and change permission on the hook file you want to run i.e. `chmod 744 <hook_file_name>`. 744 permissions should match existing `.sample` hook files already in that directory. If you are on Windows, right click the same hook file, then properties, then set execute permissions. Hopefully this will work for your situation.
I verified execute permission on hook files and the checkbox is still greyed out/disabled any suggestions?
If you use husky, run the following command:
I'm using the husky version: 7.x.x
Finally I resolved my problem!! And the solution is very simple,just excute this command (if you use husky):
`chmod +x .husky/pre-commit`
remenber,must reopen the project in webstorm,than you will seen the "run git hooks"checkbox in your commit panel.
I found this solution because it apppears some hint when I commit some code, is shows "hint: The '.husky/pre-commit' hook was ignored because it's not set as executable."