On this page
To find which files change together, mine commit history for pairs of files that appear in the same commits: code-maat does this from the command line, CodeScene packages history analysis commercially, and repowise computes the pairs at index time and tells you in review which partner file a change is missing. A git log script is enough for a first look. Sourcegraph is a code search tool and does not analyse co-change.
| Tool | Co-change support | Where it shows up | Cost | Best for |
|---|---|---|---|---|
| code-maat | coupling analysis from VCS logs | CSV on the command line | Free, GPL-3.0 | Analysts who want the raw numbers |
| CodeScene | Commercial platform with history analysis | Its web product | Free for open source; per active author otherwise | Managed product |
| git log scripts | Pair counting you write yourself | Terminal | Free | A first look |
| Sourcegraph | None, it is code search | Not applicable | See vendor | Searching code, not history |
| repowise | Stored co-change pairs, missing-partner check | CLI, dashboard, MCP tools, PR bot (GitHub) | Free for local use | Co-change in the review loop and for agents |
Scroll the table sideways to see every column.
Facts as of November 2026 from the code-maat README and CodeScene pricing. Sourcegraph row: code search is its stated purpose; I did not find a co-change feature.
We build repowise, so weigh our entry accordingly. The measurements we publish about it, with their methods, are on the benchmarks page.
What is temporal coupling?
Temporal coupling, also called co-change or logical coupling, means two files keep changing in the same commits. It does not need an import between them. It finds shared contracts, copy-pasted logic and schema-and-handler pairs that a dependency graph misses. The method and thresholds are in hidden coupling and co-change detection. Co-change is evidence of a relationship, not proof of a dependency.
How we compared
- Method: how pairs are counted and whether big commits are filtered out.
- Recency: whether an old coupling fades.
- Delivery: whether the result shows up where a change is reviewed.
- Scope: one repository or several.
code-maat
code-maat includes a coupling analysis that lists file pairs by how often they change together. It reads Git, Mercurial, Subversion, Perforce and TFS logs, and sits beside revisions, age and ownership analyses in the same tool (GitHub). Output is CSV, so you read it in a spreadsheet or script.
Pick code-maat if you want to control thresholds and feed the numbers into your own charts.
CodeScene
CodeScene is a commercial platform that analyses version-control history alongside code quality. Open source projects are free and private repositories are priced per active author (pricing). Its change-coupling documentation did not load for me today, so check its docs for the exact method before you rely on it.
Pick CodeScene if you want a managed product and visual reports for several teams.
git log scripts
A git log script counts how many commits touch both files in a pair. List the files per commit first:
git log --since="1 year ago" --name-only --pretty=format:'--'
Pipe that into a short script that counts pairs per commit. Skip commits that touch hundreds of files, such as renames and formatting passes, or every file couples with every other. This is quick and fragile; the filtering is the work.
Sourcegraph
Sourcegraph searches and navigates code across repositories. That is a different job from co-change: it tells you where a symbol is used, not which files historically move together. Use it with a co-change tool, not instead of one.
repowise
repowise walks git history once at index time, records co-change pairs for every tracked file, and labels each pair by whether the dependency graph explains it. Pairs are weighted by recency so old couplings fade, very large commits are skipped as noise, and each file keeps its 25 strongest partners. The walk covers the last 5,000 commits by default (set it with repowise init --commit-limit, up to 10,000), a pair needs at least 2 shared commits, and no model key is needed (git intelligence).
uv tool install repowise
repowise init
repowise risk main..HEAD # lists missing co-changes for the range
repowise overlap # other branches touching the same files or partners
repowise risk leads with the files that usually change with your diff and are not in it. The PR bot on GitHub puts the same note in the review comment, and the get_risk MCP tool, one of the ten repowise MCP tools, gives it to coding agents. In a workspace, repowise reports missing cross-repo co-changes between, for example, a backend and a frontend repository.
Pick repowise if you want co-change in the review loop instead of a one-off report, across one repo or several.
How to choose
- One-off question: run a git script or code-maat.
- Every pull request: repowise, so a missing partner is named in review.
- Managed reports for several teams: CodeScene.
- Several repositories that drift together: repowise workspaces.
- Interpreting results: treat a strong partner missing from a diff as a question to answer in the PR, not a failure.
FAQ
- What is temporal coupling in software?
- Temporal coupling is a pair of files that change together in the same commits more often than chance. It indicates a hidden relationship that imports may not show.
- How do I find which files change together?
- Count file pairs that appear in the same commits, skipping very large commits. code-maat's
couplinganalysis does this, and so does repowise at index time. - What is the difference between co-change and a dependency graph?
- A dependency graph shows imports and calls. Co-change shows files that move together in history, including pairs with no import between them.
- Does Sourcegraph show files that change together?
- No. Sourcegraph is a code search tool. Use a history-mining tool for co-change.
- Can co-change analysis work across repositories?
- Yes in repowise workspaces, which report missing co-changes across repositories. Single-repo tools such as code-maat read one history at a time.