Skip to main content

Run git commands across multiple repositories

Project description

mgitm (multi-git-manager)

mgitm scans the current directory for Git repositories, fetches their remotes, and displays an interactive live status table. You can review all the repos at once, sync them, open them, manage their branches...

mgitm example

Installation

pip install multi-git-manager

Requires Python 3.10+ and Git on PATH.

Usage

mgitm status

status finds direct-child repositories, refreshes their status, and fetches remotes in the background. GitHub-hosted repositories are fetched last so an interactive authentication prompt cannot prevent other repositories from being updated.

The table stays open in an interactive terminal. Use these controls:

Key Action
/ Select the previous or next repository. The selected row has a marker.
s Sync the selected clean repository.
S Sync every eligible clean repository.
r Refresh local Git status without fetching.
R Start a background fetch refresh.
o Open the selected repository in a new VS Code window.
d Dismiss live warnings and errors.
q or Ctrl+C Quit.

Clean repositories that are ahead or behind show Sync (s) in Actions. For a diverged branch, sync fetches and rebases local commits onto the tracking branch before pushing. If the rebase has conflicts, the table shows rebase conflict and offers Open (o) to open the repository in VS Code. Dirty repositories also offer Open (o) when VS Code is installed.

Warnings and errors appear beneath the table as they occur; press d to clear them.

Other commands

# Show every local branch for each repository
mgitm status --branch_all

# Read status without fetching remotes
mgitm status --no-fetch

# Print a deterministic four-repository demo table
mgitm example

# Copy direct-child repositories to another directory
mgitm copy "D:\\work\\repository-backup"

# Copy only named repositories (spaces after commas are optional)
mgitm copy "D:\\work\\repository-backup" --repos="frontend, api"

--branch_all marks the currently checked-out branch with . Working-tree status and Actions apply to that checked-out branch. In this mode, / select individual branch rows and c checks out the selected branch. After a successful checkout, mgitm refreshes the repository so its new current branch can be synced with s. Press D to delete a selected non-current branch only when it is fully merged into the current branch; mgitm asks for confirmation before deleting and refreshes the table afterwards.

Copy repositories

mgitm copy <destination> copies every direct-child Git repository into the destination, including its .git directory. Quote the destination when it has spaces. Installed dependencies and disposable caches are omitted (including node_modules, virtual environments such as .venv-*, .tox, .gradle, and Python/tool caches), so run each project's usual dependency install command afterwards.

If a target repository directory already exists, mgitm asks whether to delete and replace it, merge into it (with source files overwriting target files), or skip it. The destination cannot be inside a repository being copied.

Pass --repos=<comma-separated names> to copy only selected direct-child repositories. Names are trimmed around commas and may be quoted; unknown names are reported and skipped.

Columns

Column Meaning
Repository Repository directory. In supported terminals, clicking the name opens it in VS Code.
Branch Currently checked-out branch.
Remote Tracking branch, if configured.
Ahead / behind commit counts.
Status Cleanliness, changes, fetch failures, or rebase conflicts.
Actions Available keyboard-triggered sync or open actions.

Commands

Command Description
mgitm status Live multi-repository status and keyboard controls.
mgitm status --branch_all Show all local branches.
mgitm status --no-fetch Skip the initial remote fetch.
mgitm copy <destination> [--repos=names] Copy selected child repositories, excluding installed dependencies and caches.
mgitm example Show the dummy example table.
mgitm --help Show top-level help.

Project details


Download files

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

Source Distribution

multi_git_manager-0.3.0.tar.gz (16.5 kB view details)

Uploaded Source

Built Distribution

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

multi_git_manager-0.3.0-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

File details

Details for the file multi_git_manager-0.3.0.tar.gz.

File metadata

  • Download URL: multi_git_manager-0.3.0.tar.gz
  • Upload date:
  • Size: 16.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for multi_git_manager-0.3.0.tar.gz
Algorithm Hash digest
SHA256 8580fe21994137a512c5ff644d44053a3840cefcac3bb34a1285150541ba0d31
MD5 afbd4a60345c0f02a8934fa66175031d
BLAKE2b-256 bdd1187b2c8a7d90b93669d13ce8169d90d46844b311b4ab5491dec660c7b868

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for multi_git_manager-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8221b3de51e9bbdb10889f534dfa104f0998f98fbc73a8a1b460ae5ce8d810b6
MD5 baf835c756d7afebdd966293ef1b54e5
BLAKE2b-256 3dc8df9016c8282a887d9e275e4a121495f8b165404ae8a2a36cece307e57df0

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