
Theo - t3․gg The dangers of precommit hooks | Theo - t3․gg
Sep 12, 2025
Explore the pitfalls of pre-commit hooks and how they can frustrate developers instead of enhancing workflow. Learn about the critical differences between guardrails and safety nets in coding practices. Discover why robust Continuous Integration processes are essential for maintaining code quality and fostering effective communication within teams. Dive into the importance of deployment strategies that prioritize resilience over mere error prevention.
AI Snips
Chapters
Transcript
Episode notes
Pre-Commit Hooks Run Locally And Can Block Work
- Pre-commit hooks run locally when you git commit and can block commits for formatting, tests, or message rules.
- Theo argues they are dangerous when relied on instead of CI because they can block or be bypassed by engineers.
Enforce Checks In CI Not Just Locally
- Always enforce important checks in CI rather than only via local hooks to guarantee consistency at merge time.
- Run the same tooling in CI to prevent mismatches from different local setups or --no-verify bypasses.
Use Hooks Only For Specific Local Safety Checks
- Use local hooks only for narrow, critical checks like scanning for leaked secrets when necessary.
- Still mirror those checks in CI and treat local detectors as supplemental, not primary, protection.
