mgit2.0.2
One Rust binary · macOS · Linux · Windows

One command for every Git repository in the directory

With no arguments it is git status -s in every repository. mgit pull, mgit fetch --all and mgit log -n 1 work the same way. Clean repositories stay quiet, and failures are collected into one exit code.

  • One binary, no runtime dependencies: no Python, no Node.js, no package manager.
  • Every git argument is passed as an argument vector, never through a shell, so nothing is injected or glob expanded.
  • Releases ship SHA-256 checksums and the official installers verify them before touching your PATH.

You can actually type here: this is mgit's own parsing and discovery running in your browser

Sandbox terminal — everything happens in this tab
This terminal needs JavaScript. Nothing else on the site does: the install commands, the option tables and every documentation page work without it.
~/work $
Enter runTab completeCtrl+C interrupt

The sandbox holds six repositories, and web-console has an uncommitted change. Try mgit pull. Open the full playground

The loop you stop writing

Why it exists

The loop you stop writing

An application, a shared package, some examples, the deployment scripts and a docs site, each its own repository, sitting side by side in one working directory and referring to each other by relative path, with no git submodule holding them together. That is the situation mgit was written for.

# before
for d in */; do (cd "$d" && git status -s); done

# and a second version for PowerShell, which behaved slightly differently

One command instead, and the same binary with the same test suite on all three operating systems:

mgit

It does not change the contents of any repository and it does not manage the relationships between them. Use submodules when you need to pin versions; a monorepo is the answer when you need one CI pipeline and one release.

One executable, nothing else

What it is

One executable, nothing else

8 release targets

A single Rust binary

macOS, Linux and Windows share the same code and the same tests. The Bash and PowerShell scripts of 1.0 are archived.

No runtime dependencies

Download and run

No Python, no Node.js, no package manager. The npm package bundles the official binaries for six platforms and has no postinstall.

Verifiable

Verified before it is installed

Every archive ships a SHA-256 checksum and the official installers check it first. Every git argument is passed as an argument vector, never through a shell.

Does not reinvent git

A transparent proxy

mgit only recognises the options in its own documentation. Everything it does not know (-c, --git-dir, …) is handed to git untouched.

It only touches directories you can see

Discovery

It only touches directories you can see

By default it looks one level down, and it never walks into a repository it has already found. Drag the slider to see what --depth actually reaches.

What --depth actually reaches

1 1 repositories found

Working directory


Output of mgit --list


The full set of six rules, including worktrees, submodules, symbolic links and ordering, is in how repositories are found.

A report you can put in a script

Output

A report you can put in a script

The summary goes to stderr by default, so mgit status -s > status.txt leaves you clean data in the file while failures stay visible on screen.

What lands in the file, and what stays on screen

Inside the file: status.txt


Still on screen


Exit codes
CodeMeaning
0every repository succeeded
1a repository failed, or no repository was found
2the command line could not be parsed
127git could not be started
130interrupted with Ctrl+C
anything elsethe exit code of the first failing git command

One line, verified before it installs

Install

One line, verified before it installs

The installer detects your operating system and CPU, downloads the matching archive and verifies its SHA-256 before installing.

curl -fsSL https://raw.githubusercontent.com/doggy8088/mgit/main/install.sh | sh

The installer detects your operating system and CPU, downloads the matching archive and verifies its SHA-256 before installing anything.

Check the install: mgit --version

Manual downloads, checksum verification and building from source are in install and verify.