v1.0.0 Stable

Run Git commands across all subdirectories simultaneously

An ultra-fast, zero-dependency Bash/Zsh and PowerShell command-line utility for managing multi-repository workspaces. Discovery, branch detection, and executions in one single tap.

curl -fsSL https://raw.githubusercontent.com/doggy8088/mgit/main/install.sh | bash
mgit status -s
$ mgit
Running git operation: git status -s
================================================================================
📂 Folder: auth-service │ Branch: main
================================================================================
M src/auth.ts
?? tests/auth.test.ts
================================================================================
📂 Folder: payment-gateway │ Branch: feature/apple-pay
================================================================================
A src/applepay.ts
================================================================================
📂 Folder: web-dashboard │ Branch: main
================================================================================
# clean workspace (no output)

Powerful Multirepo Control, Simplified

Say goodbye to complex loops or scripts. mgit is designed to feel like native git but built to scale across all repositories in your workspace.

Auto-Discovery

Scans the current directory automatically to isolate folders containing a Git repository. It ignores non-git directories completely, saving you from accidental failures.

Branch-Aware Headers

Every repository output is prefixed with a beautiful, color-coded header showing the target directory name and its active branch. Instantly verify where your changes are.

Native Performance

Implemented directly in pure Bash/Zsh and PowerShell. It starts instantly and executes commands directly in parallel sequences with zero overhead or heavy runtimes.

Try mgit Online in Seconds

Choose a common Git workflow below and watch how mgit discover repos, prints statuses, pulls commits, and switches branches in real-time.

bash

Installation & Setup

mgit supports macOS, Linux, and Windows. Choose the method that best fits your environment.

One-Line Automated Install

The easiest way to install mgit is to download and run the script automatically.

macOS / Linux (Bash/Zsh)

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

Windows (PowerShell)

irm https://raw.githubusercontent.com/doggy8088/mgit/main/install.ps1 | iex

Manual Installation

Clone the repository and run the local installation script to place it in your system binaries directory.

Unix Shell (Bash/Zsh)

git clone https://github.com/doggy8088/mgit.git
cd mgit
./install.sh

Windows PowerShell

git clone https://github.com/doggy8088/mgit.git
cd mgit
.\install.ps1

How to use

Navigate to any directory containing subfolders that are Git repositories, and run your command:

mgit
List short status (git status -s) for all repositories.
mgit pull
Performs a git pull inside every subrepository.
mgit log -n 1
Displays the single latest commit across all repositories.
mgit checkout main
Switches the active branch to main across all repos.

Frequently Asked Questions

Clear answers to help you configure and troubleshoot mgit in your development flow.

What terminal shells are officially supported?

On macOS and Linux, the standard Bash and Zsh shells are fully supported out of the box. For Windows systems, mgit.ps1 is compatible with PowerShell 5.1+ as well as PowerShell Core (pwsh).

Does it scan repositories nested inside folders recursively?

No, mgit is designed to only scan the first layer of subdirectories. This makes execution extremely fast and prevents nested node_modules or system build folders from causing infinite execution loops.

Does mgit support Git Submodules?

Yes. mgit checks for the existence of a .git entry in the subdirectory, whether it is a folder (standard Git repo) or a file (as used by Git submodules or workspaces). In either case, it executes correctly.

What if I run mgit in a directory that is itself a Git repository?

If there are no subdirectories containing Git repositories, but the current directory itself contains a .git repository, mgit will fallback to executing the command on the current repository directly. It acts as an transparent wrapper.