{"slug": "til-git-hooks-exist-after-a-decade-of-using-git", "title": "TIL Git Hooks Exist (After a Decade of Using Git)", "summary": "A developer built a tool called Diff Sniffer that flags commits which are AI-authored, touch risky paths, and lack human review. The project taught the developer about Git hooks after a decade of daily Git use. The tool is available on GitHub.", "body_md": "Wrote a small tool called Diff Sniffer — flags any commit that's AI-authored, touches a path you've marked risky, and never got a human review. All three conditions or it says nothing. No AI in the tool itself, just trailers and path globs.\n\nThe part worth sharing here isn't the tool, though — it's that building the local-hook mode is what taught me git hooks exist at all. Post-commit, pre-push, whatever — you drop a script in .git/hooks/ and git just runs it. No config, no plugin API. A decade of daily git use and I'd never looked.\n\nIf anyone's further down this road than I am — better hook patterns, gotchas with pre-push vs post-commit for something like this — I'd take the pointers.\n\nFull story + the actual tool: [Coder B Dev Blog - I've use git ...](https://coderbdev.com/blog/i-ve-used-git-for-a-decade-and-never-knew-hooks-were-a-thing) / [github.com/Coderb-dev/diffsniffer](https://github.com/Coderb-dev/diffsniffer)", "url": "https://wpnews.pro/news/til-git-hooks-exist-after-a-decade-of-using-git", "canonical_source": "https://dev.to/coder_b/til-git-hooks-exist-after-a-decade-of-using-git-d1j", "published_at": "2026-07-10 13:29:08+00:00", "updated_at": "2026-07-10 13:43:28.453491+00:00", "lang": "en", "topics": ["developer-tools"], "entities": ["Diff Sniffer", "Coder B Dev", "GitHub"], "alternates": {"html": "https://wpnews.pro/news/til-git-hooks-exist-after-a-decade-of-using-git", "markdown": "https://wpnews.pro/news/til-git-hooks-exist-after-a-decade-of-using-git.md", "text": "https://wpnews.pro/news/til-git-hooks-exist-after-a-decade-of-using-git.txt", "jsonld": "https://wpnews.pro/news/til-git-hooks-exist-after-a-decade-of-using-git.jsonld"}}