RE09 All articles
Engineering Culture

Your Commits Are Immaculate. Your Debugging Is a Disaster.

RE09
Your Commits Are Immaculate. Your Debugging Is a Disaster.

Somewhere on your team, there's a developer who takes commit hygiene seriously. Atomic commits. Present-tense imperative messages. Squashed merges. Clean, bisectable history. It's almost beautiful.

And somewhere else — probably in a Slack thread from eight months ago — is the actual reason a critical piece of your system works the way it does. The context that would've saved three hours of debugging last Tuesday. The tradeoff that was explicitly discussed and then never written down anywhere searchable.

This is the changelog myth: the idea that a well-maintained git history gives you the context you need to understand your codebase. It almost never does.

What Git Actually Captures

Git is exceptional at tracking what changed. It is genuinely terrible at capturing why.

"Fix race condition in payment processor" tells you something happened. It tells you approximately nothing about what the race condition was, what caused it, what alternatives were considered, or why the chosen fix was the right one given the constraints at the time.

This isn't a knock on git. It's a description of what the tool was built to do. Version control is for change tracking. Context capture is a different problem — and most teams treat it like git's job when it isn't.

The result is a codebase that looks well-maintained from the outside and is deeply confusing to debug from the inside. The diff is clean. The reasoning is gone.

Where the Context Actually Lives

Ask a developer on any reasonably sized team where they'd look to understand a confusing piece of code, and the honest answer is usually: it depends on who wrote it and whether they're still here.

If the author is around, you ask them. If they left six months ago, you start spelunking. You check Slack if you have a business plan that doesn't purge history. You look at the PR description if someone wrote one. You check Jira or Linear if the ticket was detailed. You look at the comments in the code itself if you're lucky.

None of this is searchable in any coherent way. None of it survives team turnover gracefully. And none of it was designed to be part of your debugging workflow.

The scattered-context problem is one of those engineering costs that's genuinely hard to measure. You don't get a line item for "three hours lost reconstructing why we chose this approach." It just shows up as slower debugging, more cautious refactors, and a vague sense that the codebase is harder to work with than it should be.

The Atomic Commit Trap

Here's the part that's a little uncomfortable to say out loud: the obsession with clean git history is sometimes actively counterproductive.

When developers spend meaningful time squashing commits, rewriting messages, and rebasing branches into a pristine linear history, they're doing work that makes the log look better without necessarily making it more useful. A beautifully atomic commit that says "refactor auth middleware" is not more useful than a messier commit that says "refactor auth middleware — removing session-based approach because it was causing issues with our CDN edge caching, see #4821 for full context."

The second one is longer and less tidy. It's also the one that saves someone two hours of debugging in six months.

Atomic commits matter for bisectability. They matter when you need to cherry-pick or revert. But they're solving a different problem than context capture, and conflating the two is where teams go wrong.

What Actually Helps

The good news is that fixing this doesn't require a new tool or a team-wide process overhaul. It requires a small shift in what you decide to write down and where.

PR descriptions are underutilized almost everywhere. A PR description that captures the problem being solved, the approach taken, and the alternatives that were considered is searchable, linkable, and survives in most version control platforms indefinitely. It takes five extra minutes. It pays back that time the first time someone has to debug the code you just merged.

Architecture decision records (ADRs) get a lot of hype and deserve most of it, but they're most useful for significant decisions, not every change. The key is keeping them lightweight enough that people actually write them. A three-paragraph markdown file in a /decisions directory beats a 10-page Confluence template that nobody fills out.

Code comments get a bad reputation for stating the obvious, but a comment that explains why a specific implementation was chosen — especially when the obvious approach was deliberately avoided — is one of the highest-value things you can write. "We're using a polling approach here instead of webhooks because our customer's firewall blocks inbound connections" is the kind of comment that prevents a well-meaning refactor from breaking everything.

The Right Level of Hygiene

None of this means git history doesn't matter. It does. Meaningful commit messages, linked issue numbers, and PR descriptions that tell a story are all genuinely useful. The goal is just to be clear about what problem each of those practices is solving.

Commit hygiene is for change tracking and code review legibility. Context capture is for debugging, onboarding, and institutional memory. They overlap, but they're not the same job.

The teams that debug fastest aren't the ones with the prettiest commit logs. They're the ones who've made a habit of writing down the why — wherever it ends up living — in a form that someone can actually find later.

Clean history is nice. Recoverable context is what keeps you from losing a Friday afternoon to a mystery you should've been able to solve in twenty minutes.

All Articles

Related Articles

Nobody Hires the Builder: How Fast Shippers Get Filtered Out Before the First Call

Nobody Hires the Builder: How Fast Shippers Get Filtered Out Before the First Call

Pattern Matching Is Back, and It's Solving Problems Your Libraries Can't

Pattern Matching Is Back, and It's Solving Problems Your Libraries Can't

Cloud Bill? What Cloud Bill? The Builders Running Real Apps for Free

Cloud Bill? What Cloud Bill? The Builders Running Real Apps for Free