gmsc
v1.0.1
Published
Git Multi-repo Sync Command - Manage multiple git repositories in parallel
Maintainers
Readme
gms - Git Multi-repo Sync
A CLI tool to manage multiple git repositories in parallel. Execute git commands across all your repositories at once!
Installation
Global Installation (Recommended)
npm install -g gmscAfter installation, you can use either gms or gmsc command.
Local Development
cd gms
npm install
npm link # Creates global symlink for testingUsage
Initialize
First, navigate to a parent directory containing multiple git repositories as subdirectories:
cd ~/projects # Contains multiple git repos
gms initThis creates a .gms.json file tracking all git repositories in subdirectories.
Commands
Show status of all repos
gms statusShow current branch in all repos
gms branchCheckout a branch in all repos
gms checkout main
gms checkout feature/new-featurePull latest changes in all repos
gms pullPush to remote in all repos
gms push
gms push origin main
gms push origin feature/branchFetch from remote in all repos
gms fetchExecute any git command in all repos
gms exec "log --oneline -5"
gms exec "stash"
gms exec "merge develop"List tracked repositories
gms list
# or
gms lsFeatures
- ✅ Parallel execution for speed
- ✅ Clear status indicators for each repository
- ✅ Works with any git command
- ✅ Configurable through
.gms.json - ✅ Progress indicators with ora
- ✅ Colored output with chalk
How it Works
gms initscans for all subdirectories containing.gitfolders- Creates
.gms.jsonto track these as "notional submodules" - All commands execute in parallel across tracked repositories
- Results are displayed with success/failure indicators
Example Workflow
# Initialize in your projects folder
cd ~/projects
gms init
# Check status of all projects
gms status
# Switch all projects to main branch
gms checkout main
# Pull latest changes
gms pull
# Create and switch to new feature branch
gms exec "checkout -b feature/awesome"
# After making changes, push all
gms push origin feature/awesomeConfiguration
The .gms.json file contains:
{
"submodules": [
{
"name": "project1",
"path": "/path/to/project1"
},
{
"name": "project2",
"path": "/path/to/project2"
}
]
}You can manually edit this file to add/remove repositories.
Requirements
- Node.js >= 16.0.0
- Git installed and configured
- Repositories must be valid git repos
License
MIT
