DEV Community

duflow89
duflow89

Posted on

Git pre-commit hook not working (macOS)

Problem

the '.husky/pre-commit' hook was ignored because it's not set as executable.
Enter fullscreen mode Exit fullscreen mode

Why

it's probably a problem that wasn't created taking into account the file permissions of Linux at the time of init on Windows.
(Refernce)

Solve

chmod ug+x .husky/*
chmod ug+x .git/hooks/*
Enter fullscreen mode Exit fullscreen mode

Top comments (0)