Git hooks
Scripts git runs before a commit or a push, such as a linter on the changed files.
Scripts that git runs on a developer's machine at set moments, most often before a commit or a push: format the staged files, run the linter, check the commit message, look for secrets. Git does not share hooks through a clone, so teams install them with a tool: husky or simple-git-hooks in JavaScript, lefthook, or the pre-commit framework, each set up by a file in the repo. An agent that commits runs into the same hooks. The site counts a repo when it holds the config of one of these tools, or a folder of hook scripts.
- Pro scene today: 54%, 119 of 221 pro repos
- In three months: −<1 pt (1 pro repo removed it)
- Kept: 96%, 119 of 124 that had it 3 months ago or before
Pro 54% · Ladder 28% · 1.9×
In the pro repos
The 6 most starred of the 119 pro repos that have it today.
- firecrawl/firecrawl/apps/api/.husky/pre-commit
- n8n-io/n8n/lefthook.yml
- langgenius/dify/.vite-hooks/pre-commit
- langchain-ai/langchain/.pre-commit-config.yaml
- excalidraw/excalidraw/.husky/pre-commit
- Stirling-Tools/Stirling-PDF/.pre-commit-config.yaml
By month
| Month | Pro scene |
|---|---|
| June 2025 | 48% |
| July 2025 | 48% |
| August 2025 | 48% |
| September 2025 | 48% |
| October 2025 | 49% |
| November 2025 | 49% |
| December 2025 | 50% |
| January 2026 | 52% |
| February 2026 | 52% |
| March 2026 | 51% |
| April 2026 | 52% |
| May 2026 | 54% |
| June 2026 | 54% |
| July 2026 | 54% |
| August 2026 | 55% |
| September 2026 | 54% |
| October 2026 | 54% |
| November 2026 | 54% |
| today | 54% |
Inside the practice
What git hooks run
Of the repos with git hooks. Read from the hook scripts and configs.
- A linter or a formatter: 82%, 98 of 119
- A type check: 19%, 23 of 119
- A secret scan: 12%, 14 of 119
- Tests: 3%, 4 of 119
Evidence
Observed in the repos only: no published study is quoted for it yet.
How it is detected
Looks for husky, lefthook, simple-git-hooks, pre-commit or a folder of hook scripts. Read in repo files. How the method counts
Related practices
More in Test, the most adopted first.