macOS
brew install git-when-mergedlocal Homebrew formula metadata
sudo port install git-when-mergedMacPorts ports tree · devel/git-when-merged/Portfile · source: api.github.com
brew
Find where a commit was merged in git. Version 1.2.1 via Homebrew; verified 2026-06-18.
install
brew install git-when-mergedlocal Homebrew formula metadata
sudo port install git-when-mergedMacPorts ports tree · devel/git-when-merged/Portfile · source: api.github.com
nix profile install nixpkgs#git-when-mergednixpkgs package indexes · pkgs/by-name/gi/git-when-merged/package.nix · source: api.github.com
overview
Find where a commit was merged in git
history
git-when-merged is a Python Git extension that finds the merge commit that first brought a given commit into a branch.
Michael Haggerty created the repository in February 2013. The README says the command was originally based on a Stack Overflow suggestion for finding the merge commit that included a specific commit.
The project grew around Git-history forensics. The 2016 releases added recursive merge tracing, log output, commit-only output, branch display, and describe-based options. A 2022 release added the packaging work needed for PyPI distribution.
The README documents several installation paths: pipx from PyPI, a local virtual environment, cloning the repository onto PATH, and Homebrew for macOS users. Package-manager metadata also lists distribution through Homebrew, MacPorts, and Nix.
Practitioners use git when-merged during code archaeology, release maintenance, and regression tracking. It walks first-parent history to answer when and why a commit entered a branch, with options to show logs, diffs, merge ranges, patterns, and configured reference groups.
The tool is a package-nerd favorite because it wraps a subtle Git graph question in a memorable subcommand, making first-parent merge analysis scriptable and repeatable.
security posture
narrow executable package without higher-risk signals.
green risk · low confidence · appliance
Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.
executables
| Command | Kind | Exposure | Note |
|---|---|---|---|
git-when-merged | cli | global executable |
freshness
These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.
https://github.com/mhagger/git-when-merged
install metadata
| Package key | brew:git-when-merged |
|---|---|
| Version | 1.2.1 |
| Package manager | Homebrew |
| Package manager page | https://formulae.brew.sh/formula/git-when-merged |
| Homepage | https://github.com/mhagger/git-when-merged |
| Repository | https://github.com/mhagger/git-when-merged |
| Upstream docs | https://github.com/mhagger/git-when-merged#readme |
| License | GPL-2.0-only |
| Source archive | https://github.com/mhagger/git-when-merged/archive/refs/tags/v1.2.1.tar.gz |
| Last updated | 2026-06-18T09:25:51+09:00 |
| Pulse | updated |
| Uses from macOS | python |
| Bottle | available (on all) |
| Homebrew post-install | not defined |
| Service | none declared |
registry facts
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | git-when-merged |
| Version Scheme | 0 |
| Revision | 0 |
| Head Version | HEAD |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
source database matches
Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.
git-when-merged
nix profile install nixpkgs#git-when-mergedgit-when-merged
sudo port install git-when-mergedsource trail
This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.
View the package source record on GitHub.