pre-commit/pre-commit-hooks

Some out-of-the-box hooks for pre-commit

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 44 minutes ago
Added to GitGenius on September 9th, 2026
Created on March 13th, 2014
Open Issues & Pull Requests: 6 (+0)
GitHub issues: Enabled
Number of forks: 798
Total Stargazers: 6,678 (+0)
Total Subscribers: 46 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 0.4 hours
Mean response time: 5.1 days
90th percentile: 5.7 hours
Tracked items: 108

How this project is maintained

Around half of the issues opened in the past year never receive a reply. Only 14% of issues opened in the past year have been closed. Three people close 93% of everything that gets resolved.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 4
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 1,489 days
Stale 30+ days: 4
Stale 90+ days: 3

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • enhancement (1)
  • good-first-issue (1)
  • question (1)

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

pre-commit-hooks is a collection of ready-to-use hooks for the pre-commit framework that enforce code quality and repository integrity checks at commit time.

The tool solves the problem of preventing problematic code and files from entering a repository by providing a curated set of hooks that run automatically before commits are created. These hooks check for common issues like syntax errors in JSON, YAML, TOML, and XML files; Python code validity; merge conflict markers; oversized files; case-sensitive filename conflicts; missing shebangs on executables; broken symlinks; and debugger statements left in code. Each hook can be configured with arguments to customize its behavior, such as setting file size limits or specifying domains for VCS permalink validation.

Teams should adopt this tool if they want to establish baseline code quality standards without building custom hooks from scratch. It works well for projects using Python or those that need to validate multiple file formats commonly found in modern codebases. The hooks are particularly valuable for catching environmental issues like Windows-incompatible filenames or symlink problems that can cause friction across different development platforms. Since these are general-purpose checks rather than language-specific linters, they complement rather than replace project-specific tooling.

The project maintains a stable collection of hooks addressing recurring problems across diverse repositories. Development activity shows consistent refinement of existing hooks with support for edge cases and platform-specific concerns, such as handling git-lfs files or accommodating GitHub Enterprise domains. The tool receives updates that expand configurability of individual hooks rather than pursuing rapid feature expansion.