Modern native Git hooks made easy 🐶 woof!
Modern native Git hooks made easy
Husky improves your commits and more 🐶 woof!
npm install husky -D
package.json > preparescript and run it once:
npm set-script prepare "husky install" && npm run prepare
Add a hook:
npx husky add .husky/pre-commit "npm test"
Make a commit:
$ git commit -m "Keep calm and commit"
For more use cases, see documentation.
Important Upgrading from v4 to v6 requires additional steps, please see the docs.
The full list of Sponsors can be viewed in the docs, on Open Collective and on GitHub sponsors.