Where Does Husky Store Git Hooks?
Husky keeps hook scripts in .husky at the repo root, installed by the prepare script in package.json.
Last updated
Husky stores Git hooks as executable files in .husky at the repository root. Each filename matches a Git hook event with the command to run inside. The prepare script in package.json installs them on npm install.
Newer versions removed the old .git hooks directory approach entirely. Skipping hooks works per command with the standard no verify flag. Keep hook scripts fast or developers route around them.
Where Husky stores this, by platform
[Repo]/.husky
One executable file per hook event with commands inside. Installed by the prepare script on install. Skipped per run with no verify.
[Repo]/.husky
Same root folder on Mac. GUI clients run hooks through their own shells. Keep scripts POSIX clean for every client.
[Repo]\.husky
Same folder on Windows. Line endings in hook files must stay Unix style. Git Bash executes them regardless of editor.
Frequently asked questions
Why did my Husky hooks stop running?
The prepare script never ran after cloning, so hooks never installed. Run the install command manually once. Check the hooks path config for custom locations.
Where do hook commands live?
Inside the hook files in .husky, usually calling npm scripts or binaries. Shared logic belongs in scripts the hooks invoke. Keep hooks thin wrappers.
Notice an outdated path? Let us know.