Projects / mgit
Run commands across many Git repositories at once.
Sweeps a directory of checkouts and runs the same Git or shell command across all of them, reporting per-repository results so a wide working set stays legible.
Released command-line tool · currently published as v0.13.0 · preview
The problem
What this is for.
A directory full of related checkouts turns every routine question — what is dirty, what is behind, did that change land — into a hand-written shell loop that nobody maintains. mgit runs one command across the whole set and prints the repository name before each result, so the answer is readable at a glance instead of being reconstructed from scrollback.
Whose problem
Whether it is yours.
You want this if you keep more than a handful of repositories side by side and have caught yourself writing for-loops over them. If you work in one repository at a time, it will not earn its place.
Capabilities
What it actually does.
- Run any Git subcommand across every repository in the selected set, with the repository name printed before its output.
- Run an arbitrary shell command instead, so the same sweep works for tests, builds or greps.
- sync: fast-forward-only pulls and ordinary pushes on clean tracking branches, rolling already-current repositories into a single count so only the interesting ones are shown.
- Discover the set by walking the current directory, or fix it explicitly in a checked-in workspace document with named groups.
- register: write that workspace document, for a container directory or for a repository that owns cross-repository metadata.
State
How finished it is.
Published as v0.13.0 and labelled preview — the most exercised of the four tools day to day. It is a standalone Bash script whose only runtime dependencies are Bash 3.2 or later and Git.
Using it
How to start.
Install it, point it at a directory of checkouts, and run one Git or shell command across all of them.
Prefer Homebrew.
The Knowledge Islands tap packages mgit, so Homebrew owns upgrades and removal. Naming the tap in the argument taps it implicitly.
brew install knowledgeislands/tap/mgit
Or use the stable installer endpoint.
The URL below is this site's stable machine route. It redirects to the installer published at v0.13.0 in the source repository, which owns the installer's behaviour and any signature or checksum verification it performs.
curl -fsSL https://knowledgeislands.info/install/mgit | sh
Boundaries
What it deliberately does not do.
It executes commands and reports what happened. It holds no authority over the repositories it sweeps and changes none of their governance, and it is not a forge client: pull requests, issues and reviews are outside what it can see.
Authority
What this repository owns.
Owns multi-repository command execution across a working set. It holds no authority over the repositories it sweeps and changes none of their governance.
That boundary is deliberate. The ecosystem separates philosophy, engineering discipline, capability semantics, portable standards, and executable behaviour so that none of them can quietly absorb another. The full directory shows where this project sits relative to the rest.
Nearby
The rest of the released set.
ki— The Knowledge Islands command-line interface.git-almanac— Inspect one local Git repository's calendars, authors and reports offline.rig— A declarative description manager for a person's working setup.
See every public project, or go straight to the released command-line tools.