Skip to main content

git-overlap

git-overlap is a package of three git commands: git footprint, git overlap and git pairmerge. Installing it puts git-footprint, git-overlap and git-pairmerge on your PATH; git runs any git-NAME program on PATH as git NAME, so no configuration is needed.

Several branches, often from AI agents working in parallel, edit the same few files. Each branch is fine alone, but when one lands the others conflict or must be re-tested, so landing them one at a time multiplies CI runs and agent time. git-overlap shows, before any merge, which branches change the same files and which pairs really conflict, so they can be batched, reordered or fixed first.

git-overlap was inspired by Xuchen Yao's article "Rethinking Merging and Continous Integration for Agentic Workflows" (4 November 2026). It covers the measurement side the article calls for; see Relation to the article.

Requirements and portability

  • Python 3.8 or later, standard library only.
  • git 2.38 or later. git pairmerge needs git 2.43 or later; on an older git it exits 2 with a message naming 2.43. git must be an executable named git on PATH.
  • Linux, macOS and Windows, all tested in CI.
  • The examples are POSIX sh; on Windows, run them from Git Bash. Windows has two further limits on refs and git shims; see Limitations.

Install

From a release tag:

pip install git+https://github.com/jacob-adm/git-overlap@v0.3.0

From a clone:

git clone https://github.com/jacob-adm/git-overlap
cd git-overlap
pip install .

Either way pip installs git-footprint, git-overlap and git-pairmerge as console scripts. If git answers that footprint is not a git command, the directory pip installs scripts into is not on PATH. Check the install:

git footprint --version
git-footprint 0.3.0

Use -h for usage: git footprint --help is answered by git itself, which looks for a manual page. Without installing, each command also runs from a clone as python3 -m git_overlap.footprint (and .overlap, .pairmerge).

Quick start

Inside the repository to check, list its branches one per line and pipe them through the three commands. Replace main with the base branch and refs/heads/agent/ with the refs to check, for example refs/remotes/origin/ for every branch fetched from origin. Below, the commands run in the example repository.

git for-each-ref --format='%(refname:short)' refs/heads/agent/ |
  git footprint main | git overlap | git pairmerge --onto main | cut -f1-3 | uniq
agent/a	agent/b	conflict
agent/a	agent/c	conflict
agent/a	agent/d	conflict
agent/b	agent/c	conflict
agent/b	agent/d	conflict
agent/c	agent/d	conflict
agent/f	agent/g	stale

Each line is a pair of branches that conflict when both land on main, one after the other. Drop | cut -f1-3 | uniq to see the conflicted files. agent/e shares no file with any other branch, so git overlap passes on no pair that includes it and git pairmerge never merges it. agent/f no longer merges into main, so its pair is stale, not a conflict; the Stale branches recipe finds such branches. Without --onto main, each pair is merged at its own merge base, where agent/f and agent/g conflict because agent/g carries the change to main that agent/f conflicts with.

Output read on a terminal shows control bytes in names as \xHH; output piped to another program is always the raw bytes.

Documentation

  • Commands: each command's input, output, options and exit status, with examples.
  • Recipes: pipelines that find hotspots, measure p and test merge drivers.
  • Use cases: real runs on three public repositories, with recorded output and timings.
  • Limitations and security: what the commands miss, read and write.
  • Using it with other tools: pr-merge-audit, line-oriented tools and bug-age.
  • Relation to the article: what the article finds and which parts are covered.
  • SPEC.md: the full reference: every option, record format, error and edge case.

Licence

Apache-2.0; see LICENSE.

Metadata

Release files for git-overlap 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for git-overlap 0.3.0
File Size Uploaded Provenance Actions
git_overlap-0.3.0.tar.gz 85.1 kB With provenance Details for git_overlap-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for git-overlap 0.3.0
File Interpreter ABI Platform Actions
git_overlap-0.3.0-py3-none-any.whl Python 3 none any Details for git_overlap-0.3.0-py3-none-any.whl

Total release size: 114.1 kB

Release files / git_overlap-0.3.0.tar.gz

Download URL git_overlap-0.3.0.tar.gz
Size 85.1 kB
Tags Source
SHA-256 checksum
How to use checksums
f97e8f770f61e278857bca4cb166c824d4eb964ad3b5d9c2d3d8331798f08cc2
BLAKE2b-256 checksum
How to use checksums
9ae35fc0fd05cce4ff8a8105b76729aff221e3cf63ef49879210953b79f84ab3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.

Transparency log

Release files / git_overlap-0.3.0-py3-none-any.whl

Download URL git_overlap-0.3.0-py3-none-any.whl
Size 28.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a01a6a3964acaa3f67a58db8acf5fc9b5b2fafa099dd311bd5aff4546ec26ca3
BLAKE2b-256 checksum
How to use checksums
e36f2e636221001add7908e00d8af2304f94c31ee761fd776fac243b5f0b7846
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.

Transparency log

Security for git-overlap 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for git_overlap-0.3.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page