Developer and Text Tools

What Your Git History Says About Your Codebase

How to analyse commit history for hotspots, churn, ownership, bus factor and change coupling, and how to use them to plan refactoring and onboarding.

Saizul Amin
Saizul Amin2 Nov 2026 · 3 min read
What Your Git History Says About Your Codebase

What Your Git History Says About Your Codebase

Static analysis looks at code as it is today. Version control history shows how it got there: which files change all the time, who knows which areas, and which parts quietly depend on each other. These behavioural signals are often better predictors of bugs and delays than any code metric. This guide explains the most useful ones and how to read them, using the free git commit history analyzer.

Getting the data

Every commit records its author, time and the lines added and removed in each file. git log --numstat prints exactly that, and a browser-based analyser can also read a repository folder directly. Analyse a meaningful period, such as the last year or the last few hundred commits, and exclude generated files like lockfiles and build output, which would otherwise dominate every chart.

Churn

Churn is the amount of change: lines added plus lines removed. High churn in a file is not bad in itself; active features change a lot. But churn that continues month after month in the same file often means unclear design, repeated bug fixes or requirements that keep shifting.

Hotspots

A hotspot is a file that is both large and frequently changed. Size alone is not a problem if nobody touches the file; frequent change alone is fine if the file is small. The combination is where developers spend effort and where defects concentrate. A short list of hotspots is the best starting point for refactoring, extra tests or more careful reviews, because improvements there pay back on every future change.

Ownership and knowledge risk

For each file, the author with most changes is its main owner. When one person owns most of the codebase, the team has a low bus factor: if that person leaves, nobody else knows large parts of the system. The estimate is simple: count how few authors are main owners of more than half of the files. A result of one or two is a signal to pair, review and rotate work deliberately.

Activity patterns

Commits per week show the rhythm of a project: steady work, release spikes, quiet holidays. A weekday by hour heat map shows when work happens. Many commits late at night or at weekends can point to pressure that deserves a conversation, though time zones and personal preferences explain a lot, so read it with care.

Change coupling

Files that change in the same commits again and again are logically coupled, even if no import links them. Coupling between a component and its test is expected. Coupling between distant folders, such as a billing service and an email template, often reveals a hidden dependency that should be made explicit or removed.

File age

How long ago a file last changed is a quiet but useful signal. Old, untouched code is usually stable. New large files deserve attention because their design is still settling. Colouring files by age on a map shows at a glance which parts of a system are alive.

Using the results responsibly

These numbers describe work patterns, not the value of people. Commit counts reward small commits; line counts reward verbose code. Never use author statistics for performance reviews. Use them to ask better questions: why is this file always changing, who could learn this area, which dependency should we break.

Limits

History only shows what was committed in the analysed range. Squash merges hide individual contributions, mass formatting changes inflate churn, and renames can split a file's history unless they are detected. Combine history analysis with code reviews and conversations with the team before acting on it.

Completely freeNo cost, no sign-up
Files stay privateEverything runs in your browser
Easy in your languageAvailable in many languages