Git hooks made easy
Husky can prevent bad git commit
, git push
and more 🐶 woof!
npm install @pab78430/husky --save-dev
Create hooks in folder ./hooks
To go further, see the docs here.
Note: there's a known issue with Node v12.0
, please use v12.1
or higher.
npm uninstall husky
Git hooks installed by husky will be removed.
- Keeps existing user hooks
- Supports GUI Git clients
- Supports all Git hooks (
pre-commit
,pre-push
, ...)
- pkg-ok - Prevents publishing a module with bad paths or incorrect line endings
- please-upgrade-node - Show a message to upgrade Node instead of a stacktrace in your CLIs
- pinst - dev only postinstall hook