All Topics
All Topics
Technology
Technology
Design
Design
Programming
Programming
Science
Science
News
News
Gaming
Gaming
Entertainment
Entertainment
Business
Business
Finance
Finance
Sports
Sports
Health
Health
Food
Food
Travel
Travel
Art
Art
Music
Music
Books
Books
Education
Education
Politics
Politics
Personal
Personal
No algorithm. No AI slop. No ads. Just RSS. Pro-human. Indie writers. Real journalism. Open web. Chronological. Hand toasted.

Why Pre-Push Hooks Are Better Than Pre-Commit Hooks for Software Development

By

todsacerdoti

5mo ago· 8 min readenOpinion

Summary

The article critiques pre-commit hooks in software development, arguing they are fundamentally broken because they block developers from committing code, create friction in the workflow, and can be bypassed. The author suggests using pre-push hooks instead, which allow developers to commit locally but prevent pushing broken code to shared repositories. The article uses a Rust project example to demonstrate how pre-commit hooks interrupt the natural development flow and proposes pre-push hooks as a better alternative that maintains code quality without disrupting the commit process.

Key quotes

· 5 pulled
pre-commit hooks are fundamentally broken
They tell me I need to have 'proper formatting'
use pre-push hooks instead
pre-commit hooks block developers from committing code
pre-push hooks allow developers to commit locally but prevent pushing broken code to shared repositories
Snippet from the RSS feed
use pre-push hooks instead

You might also wanna read