WindowsmacOSLinux

Where Does Lefthook Store Config and Hooks?

Lefthook lefthook.yml inside your repo plus installed hooks in .git on each OS.

Last updated

Lefthook reads lefthook.yml at the repo root and installs shims into .git hooks on install. The yml is the source of truth.

There is no global store that matters. The repo is portable. Moving machines needs only the repo plus the binary and one install run.

Where Lefthook stores this, by platform

Windows
[RepoDir]\lefthook.yml

Config at root. Installed shims live in [RepoDir]\.git\hooks\. Run lefthook install after cloning; hooks do not travel through git itself.

macOS
[RepoDir]/lefthook.yml

Same layout. Local overrides in lefthook-local.yml stay uncommitted. Reinstall shims after git operations that reset hooks.

Linux
[RepoDir]/lefthook.yml

Same arrangement. CI typically skips install and runs lefthook run directly. Commit lefthook.yml; ignore local variants.

Frequently asked questions

Where is Lefthook config?

At lefthook.yml in the repo root. That file defines pre-commit and pre-push pipelines. Shims in .git hooks only call back into it.

Hooks stopped running after clone. What now?

Run lefthook install in the repo root. Cloning never carries .git hooks. The yml was there all along; only shims were missing.

Notice an outdated path? Let us know.