Skip to main content

Run git commands across multiple repositories

Project description

mgitm (multi-git-manager)

Run git commands across multiple repositories at once.

Scans the current directory for git repos, fetches from remotes, and displays a clean summary table — no more cd-ing into each folder to check what's going on.

Installation

pip install multi-git-manager

Requires Python 3.10+ and git available on PATH.

Example

A directory with four repos:

$ mgitm status
                    mgitm status
╭──────────┬──────────────┬─────────────────┬──────┬────────────────╮
│ Repo     │ Branch       │ Remote          │ ↕    │ Status         │
├──────────┼──────────────┼─────────────────┼──────┼────────────────┤
│ frontend │ main         │ origin/main     │ ↑2   │ ✓ clean        │
│ backend  │ develop      │ origin/develop  │ ↑1 ↓3│ staged         │
│ docs     │ master       │ origin/master   │ —    │ ✓ clean        │
│ infra    │ main         │ none            │ —    │ untracked      │
╰──────────┴──────────────┴─────────────────┴──────┴────────────────╯
  • frontend — 2 commits ahead of origin, clean working tree.
  • backend — 1 ahead, 3 behind, has staged changes.
  • docs — up to date, clean.
  • infra — no remote configured, has untracked files.

With --branch_all:

$ mgitm status --branch_all
               mgitm status — all branches
╭──────────┬──────────────┬─────────────────┬──────┬─────────────╮
│ Repo     │ Branch       │ Remote          │ ↕    │ Status      │
├──────────┼──────────────┼─────────────────┼──────┼─────────────┤
│ frontend │ → main       │ origin/main     │ ↑2   │ ✓ clean     │
│          │   develop    │ origin/develop  │ —    │ —           │
│          │   experiment │ origin/experime…│ ↓5   │ —           │
│ backend  │ → develop    │ origin/develop  │ ↑1 ↓3│ staged      │
│          │   main       │ origin/main     │ —    │ —           │
│ docs     │ → master     │ origin/master   │ —    │ ✓ clean     │
│ infra    │ → main       │ none            │ —    │ untracked   │
│          │   feature-x  │ none            │ —    │ —           │
╰──────────┴──────────────┴─────────────────┴──────┴─────────────╯

The marks the currently checked-out branch in each repo. Status is only meaningful for the active branch.

Usage

mgitm status

Fetches all repos, then prints a table of branch, remote tracking, ahead/behind counts, and working-tree cleanliness.

mgitm status --branch_all

Same table, but lists every local branch as its own row instead of just the checked-out one.

Commands

Command Description
mgitm status Fetch remotes and show per-repo summary
mgitm status -h Show help for the status command
mgitm --help Show top-level help

PRs and new feature requests are welcome!

Open a GitHub issue and/or submit a PR for any useful improvement you come up with.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

multi_git_manager-0.1.1-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file multi_git_manager-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for multi_git_manager-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7082dbda8d0a54cfc6b0fa981b2ea9148f08b659f0075f2d2f94f32606a2be25
MD5 7a490a3a24c80231905068c9d1dab22c
BLAKE2b-256 1484cd865e4303dd69f5378cb19c0572215302e12198195bb8366721cd54f10d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page