How to Turn Git Commits Into a Technical Case Study With AI

A commit called ‘Fix export issue’ isn't much of a story. Someone changed some code, sure—but what went wrong, and why should another developer care? That's where we start when turning Git history into an article.

We recently used AI to work through a local repository and build a few case studies from related commits. The useful part was following the trail: a message pointed us toward a change, the diff showed what happened, and nearby code sometimes changed the explanation altogether.

Here's how we did it, including a couple of places where a perfectly confident AI summary could have sent us in the wrong direction.

Start with a problem a reader might recognize

We started by looking for changes that raised a question we could actually explain. An expired payment link was blocking the next request. An export fix changed just one line. A payment feature acquired its own permission check. Small changes, but each had something worth following.

The resulting payment-link investigation, SQL export review, and permission audit show how differently a small code change can read once you follow its surrounding behavior.

The commit alone wasn't enough. We needed a question: why did an expired link still block a new one? Which table owned that grouping field? Did the permission check protect the routes behind the button? Once we had that, we knew what to read next.

It also gave us a stopping point. In a large repository, it's very easy to keep following interesting code and forget what the reader came for.

Read the before and after versions

For the payment-link case, the commit message pointed to the fix. The earlier code showed a duplicate check based on unfinished status. The newer code handled eligible expired records before repeating that check. A separate expiry function showed the active 48-hour rule.

Then we found a comment saying the link expired after 15 minutes. The active code said 48 hours; the shorter check had been commented out. Trust the comment and you'd write a tidy explanation with the wrong number in it. We kept the 48-hour rule.

For the export case, the diff was only one line. We looked at the joins and the branch for item-level detail, then stopped short of claiming a specific database error because the commit did not include one.

Keep an evidence note beside the draft

We kept a short note beside each draft: the revision, the relevant code, and anything we still couldn't verify. A Git date tells you when a commit was recorded. It doesn't tell you when the change reached users.

That note was handy whenever a sentence started sounding a little too certain. We could say the code invalidates eligible expired records before checking for duplicates. We couldn't say customers stopped seeing the problem—we didn't have monitoring or incident records showing that.

You don't need an elaborate evidence system. Write down the revision and code path behind a claim, what you found there, and what you'd need to check before saying more. For example:

Question: Why did an expired request block a new one?
Code evidence: Earlier duplicate check used unfinished status; later code handled eligible expired records first.
Supported claim: The creation path changed its order of checks.
Still unknown: Deployment date, production frequency, and user impact.

This gets especially useful when a feature has been changed several times. A later fix doesn't tell you whether every earlier version was deployed.

Make the writing human without inventing a human story

Starting with an architecture tour can make a small, useful story feel like homework. For the payment-link article, we started with the contradiction: the link no longer worked, but the system still wouldn't let anyone create another one.

We described the database as having ‘not gotten the memo.’ A little personification makes a stale status easier to picture. Then we explained the actual checks, so the phrase had something solid behind it.

We didn't add customer quotes, invented conversations, or a claim that AI wrote the original fix. The repository gave us enough to explain the code. Anything about the people involved needed another source.

A compact workflow to reuse

Want to try it on your own repository? This is the sequence we'd use:

  1. Pick a reader question, not just an interesting commit title.
  2. Group the commits that introduced, adjusted, and fixed the behavior.
  3. Read the relevant code at each revision, including called helpers and surrounding checks.
  4. Record what the code proves and what would need logs, tests, or deployment records.
  5. Draft the article around the reader's problem, then audit each factual sentence against the evidence note.

Before publishing, read it once more with the code open. Check the comment you quoted. Check whether that date is a commit date or a deployment date. If you recommend a test, make sure the sentence doesn't accidentally imply you've already run it.

AI helped us find and connect the pieces faster. Deciding which claims belonged in the article still took a careful read. If the repository doesn't answer a question, leave it open—and tell the reader what would answer it.

Keep the evidence in a reusable record

A useful record should survive a change of writer. Put the before and after code references beside the claim they support, then leave separate spaces for a test result and a deployment result. An empty field is a useful reminder to investigate; it should not become a confident sentence in the article.

The engineering review pack includes a blank evidence template. Try filling it in for one commit before drafting. If you cannot name the reader’s question or show the changed behavior, follow the code a little further before choosing the story.

For a maintenance example with a recorded web-runtime check, see updating PHP in a WordPress Docker deployment.