pre-commit
The most recommended of 5 Git hooks managers
Runs linters and checks on changed files before each commit, and the same definitions can run in CI. Critics say hooks break with history edits and cross-platform builds.
Runs linters and checks on changed files before each commit, and the same definitions can run in CI. Critics say hooks break with history edits and cross-platform builds.
44 people gave an opinion
- recommend it
- 24
- criticize it
- 20
- approval share
- 55%
Recommended in 7 of 13 months
- November 2025: recommended
- December 2025: recommended
- January 2026: not recommended
- February 2026: recommended
- March 2026: not recommended
- April 2026: recommended
- May 2026: recommended
- June 2026: not recommended
- July 2026: recommended
- August 2026: recommended
- September 2026: not recommended
- October 2026: not recommended
- November 2026: not recommended (month in progress)
Why it doesn’t carry the badge
- 24 people recommend itNeeds 10 or more, met.
- 1.2 recommenders for every criticNeeds 2 to 1 or better, not met.
- Recommended in 7 of 13 monthsNeeds 4 or more, met.
The same three rules apply to every product, and the badge can’t be bought. How the badge works
What people say about it
The reasons people give, with the number of comments that give each one. Open a reason to read what they said.
Why people recommend it
Each mark is one comment
Shared checks for local and CI
“It's a really good way to share check definitions between local development and CI”
Comment from 27 Dec 2025 in “Pre-commit hooks are fundamentally broken” “Just add `pre-commit run -a` to your CI. Job done.”
Comment from 23 Apr 2026 in “Highlights from Git 2.54” Ready-made checks and a check runner
“has a large ecosystem of off the shelf checks for various language linters and other checks”
Comment from 3 Feb 2026 in “Prek: A better, faster, drop-in pre-commit replacement, engineered in Rust” “It's just handy as a check runner.”
Comment from 4 Feb 2026 in “Prek: A better, faster, drop-in pre-commit replacement, engineered in Rust” Catches failures before CI
“I've also found pre-commit useful to prevent CI failure.”
Comment from 28 Dec 2025 in “Pre-commit hooks are useful” “it saves them time as CI would fail anyway”
Comment from 3 Feb 2026 in “Prek: A better, faster, drop-in pre-commit replacement, engineered in Rust” Fast enough in everyday use
“It adds negligible time to each commit and I have several hooks in use.”
Comment from 3 Feb 2026 in “Prek: A better, faster, drop-in pre-commit replacement, engineered in Rust” “I never have had an issue with performance with pre-commit?”
Comment from 3 Feb 2026 in “Prek: A better, faster, drop-in pre-commit replacement, engineered in Rust”
What people warn about
Each mark is one comment
Hooks are fragile or the wrong approach
“Pre-commit hooks are the wrong way to go about this stuff.”
Comment from 3 Feb 2026 in “Prek: A better, faster, drop-in pre-commit replacement, engineered in Rust” “Imho pre-commit is an antipattern. It tends to break”
Comment from 19 Nov 2025 in “Better pre-commit, re-engineered in Rust” “pre-commit is just a bad way to do this”
Comment from 27 Dec 2025 in “Pre-commit hooks are fundamentally broken” Maintainer resists changes and feedback
“I did some digging in the issues and PR's of pre-commit, the guy seems to be a major douche.”
Comment from 19 Nov 2025 in “Better pre-commit, re-engineered in Rust” “the resistance to implement/merge useful things that basically everyone wants”
Comment from 19 Nov 2025 in “Better pre-commit, re-engineered in Rust” “The pre-commit author was straight up hostile to discussions of uv support”
Comment from 19 Nov 2025 in “Better pre-commit, re-engineered in Rust” Breaks with history edits and rebases
“trying to make them automatic just leads to pain when they interact with any non-trivial git feature”
Comment from 27 Dec 2025 in “Pre-commit hooks are fundamentally broken” “i regularly edit history of PRs for a variety of reasons and avoid pre-commit when possible.”
Comment from 3 Feb 2026 in “Prek: A better, faster, drop-in pre-commit replacement, engineered in Rust” Fails when building on other platforms
“That works fine for some things, but it doesn't work for building and testing on other platforms.”
Comment from 1 May 2026 in “If I Could Make My Own GitHub” “you still have hooks building Python wheels and whatnot, which fails annoyingly often.”
Comment from 3 Feb 2026 in “Prek: A better, faster, drop-in pre-commit replacement, engineered in Rust”
Other Git hooks managers people recommend
The four most recommended other Git hooks managers, with the same counts for each, so you can compare like for like. The tick on each bar marks the 2 to 1 line the badge needs.
See all 5 Git hooks managers, rankedWhat people said
40 of the 51 comments that mention it, newest first. Each links to the original comment.
“A /precommit tool can be very powerful”
“imposed with pre-commit so the agent can fix things automatically”
“Hook them to git pre-commit, either yourself or with husky or python pre-commit.”
“That works fine for some things, but it doesn't work for building and testing on other platforms.”
“My approach is to utilize https://pre-commit.com/ to have all checks available to run locally during commit”
“The pre-commit tool does way more than that.”
“I hate it so, so much, and frankly don’t get the appeal.”
“Just add `pre-commit run -a` to your CI. Job done.”
“Scripts are deterministic, run in milliseconds, and use zero tokens.”
“It's just handy as a check runner.”
“They expect hooks to be managed in isolated repos with exclusive use of tags.”
“using it on a big monorepo can take a while”
“has a large ecosystem of off the shelf checks for various language linters and other checks”
“it doesn't have any way for you to have your own commit hoos that run in addition to the hooks”
“provides a convenient way to organize running a collection of shell scripts”
“It adds negligible time to each commit and I have several hooks in use.”
“i regularly edit history of PRs for a variety of reasons and avoid pre-commit when possible.”
“you pretty much give some guy you don't know full access to your machine”
“Pre-commit hooks are the wrong way to go about this stuff.”
“you still have hooks building Python wheels and whatnot, which fails annoyingly often.”
“Besides during commit, pre-commit/prek can run all hooks with `run`.”
“it saves them time as CI would fail anyway”
“I never have had an issue with performance with pre-commit?”
“I find this much easier than juggling two pull requests.”
“I've also found pre-commit useful to prevent CI failure.”
“never had these issues even using rebase flows exclusively”
“pre-commit is just a bad way to do this”
“trying to make them automatic just leads to pain when they interact with any non-trivial git feature”
“It's a really good way to share check definitions between local development and CI”
“does its best to make hooks faster (by running them in parallel if possible)”
“abstracts all these issues away and offers a bunch of other advantages as well”
“running locally automatically on changed files just gives me an early warning”
“You can use git hooks. Pre-commit specifically.”
“the resistance to implement/merge useful things that basically everyone wants”
“I did some digging in the issues and PR's of pre-commit, the guy seems to be a major douche.”
“pre-commit is supported by everyone”
“The pre-commit author was straight up hostile to discussions of uv support”
“We use that pattern for almost all our projects.”
“Imho pre-commit is an antipattern. It tends to break”
“The “and” here are the main annoyances with pre-commit.”
Counts come from 1,795,640 Hacker News comments, November 2025 to November 2026. How we count. Report a mistake.