Skip to content

rsanheim/git-all

Repository files navigation

git-all

A fast CLI for running parallel git operations across many repositories.

Why git-all?

If you work with multiple git repositories (microservices, monorepo-adjacent projects, or just many OSS checkouts), running git pull or git status across all of them is tedious. git-all makes it fast and scannable:

$ git-all pull
api-service   Fast-forward: 1 file changed
repo-a        Already up to date.
repo-b        Fast-forward: 3 files changed
repo-c        Already up to date.
  • Parallel execution - all repos update simultaneously
  • Single-line output - one line per repo for easy scanning
  • Deterministic alpha ordering - quickly find the repo you care about

Installation

brew tap rsanheim/tap
brew install git-all

Build from source and install this checkout globally:

script/install -t rust
export PATH="$HOME/.local/bin:$PATH"
git-all --help

Requirements:

  • macOS only for now (Apple Silicon or Intel) - cross-platform builds coming
  • Git 2.25+ recommended (uses git -C for directory switching)

Usage

Multi-Repository Mode

When run from a directory containing multiple git repos (but not inside one), git-all discovers repos at depth 1 and runs commands in parallel:

git-all pull      # Pull all repos
git-all fetch     # Fetch all repos
git-all status    # Status all repos

Any other command passes through to git for each repo:

git-all log --oneline -5    # Show recent commits in all repos
git-all branch              # List branches in all repos

Passthrough Mode

Inside a git repository, git-all acts as a transparent wrapper. git-all status becomes git status. This lets you use git-all everywhere without thinking about which mode you're in.

Options

-n, --workers N   Parallel workers (default: 8, 0 = unlimited)
--scan-depth <N|all>  Repository scan depth (default: 1)
--dry-run         Print commands without executing
--https           Force HTTPS URLs for remotes
--ssh             Force SSH URLs for remotes

Meta Commands

git-all meta help shows version info and git-all's own help (git-all help passes through to git's help)

$ git-all meta help
git-all v0.7.1-rc.3 (git 2.52.0)
...

Performance Tips

For network operations (pull, fetch), git-all disables SSH ControlMaster multiplexing by default. When you fan out many git processes against a single host, multiplexing them over one connection serializes the work (OpenSSH's MaxSessions default is 10, and GitHub caps server-side too), so disabling it lets each subprocess open its own connection and scale with --workers. Network throughput is far better as a result.

If you have only a handful of repos and your workflow benefits from multiplexing, opt back in per run:

git-all --ssh-multiplexing pull

This makes git-all inherit your ~/.ssh/config unchanged.

Similar tools

There are a lot of similar tools out there, and most of them are more powerful and 'set it and forget it' than git-all. They also tend to require more configuration and setup. Use what works for you!

  • ghorg - clone or backup entire user/org repos into one dir
  • ghorg - remote repo managemnt made easy
  • git-xargs - run git commands across many repos

Development

git-all is implemented in multiple languages (Rust, Zig, Crystal) to compare approaches, benchmarks, and to generally see how LLMs do working from a SPEC.md driven approach. The blessed implementation is the Rust implementation, so homebrew installs that. If you want to play with other implementations, clone this repo and build them yourself:

script/build -t rust         # Build
script/test -t rust          # Test
./bin/git-all-rust status    # Run locally

See docs/SPEC.md for the formal specification, docs/dev/ for contributor documentation, and CircleCI for build status.

scary AI warning I built this with much help from AI agents. Its been fun to see what LLMs can do with something like a formal(ish) specifications across languages I don't know (Rust, Zig) and languages I do know (Ruby, Go, Crystal).

FWIW, I use git-all everyday, so far it works well for me.

License

MIT - see LICENSE

About

neato git

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors