Open lancemach opened 2 months ago
husky init
should only be run once on a project
when cloning the project on another machine, you just need to run pnpm install
to have hooks working.
husky init
should only be run once on a project when cloning the project on another machine, you just need to runpnpm install
to have hooks working.
Could you please describe this in detail. I meet the same issue: when clone the repository, the prepare
script will reset all hooks in my project. Here is my config:
// package.json
"scripts": {
"prepare": "husky"
}
"husky": "^9.0.11",
First I have husky set up in my project and everything is working. And add it to git version control. I then cloned the project on another machine and ran pnpm install, overwriting the pre-commit and commit-msg files because of husky initialization. Because I have custom code in these two files. How should I deal with this problem, thank you!