I'm setting up husky v6 on a new repo, but am having trouble getting it to work as compared to our previous repos using v4.
I see the .husky directory is created when husky is installed, and if hooks are created they are added to this directory. We had been excluding the whole .husky directory from source control, but now I'm not sure if this is correct.
The issue is that when another person clones the repository and runs npm install, the hook we want to run does not get created in their local .husky directory.
I've created a simple repo to test with, which shows that the "precommit" hook in package.json is not created in .husky directory.
-> git clone git@github.com:l3ender/husky6-debug.git && cd husky6-debug
...
-> npm install
> husky6-debug@1.0.0 prepare /Users/ross/repos/husky6-debug
> husky install
husky - Git hooks installed
added 96 packages from 65 contributors and audited 96 packages in 4.381s
19 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
Context
Please describe your issue and provide some context:
I'm setting up husky v6 on a new repo, but am having trouble getting it to work as compared to our previous repos using v4.
I see the
.husky
directory is created when husky is installed, and if hooks are created they are added to this directory. We had been excluding the whole.husky
directory from source control, but now I'm not sure if this is correct.The issue is that when another person clones the repository and runs
npm install
, the hook we want to run does not get created in their local.husky
directory.I've created a simple repo to test with, which shows that the "precommit" hook in package.json is not created in
.husky
directory.Context Please describe your issue and provide some context:
Thank you!