{"id":51119004,"url":"https://github.com/sulthonzh/git-batch","last_synced_at":"2026-06-25T00:30:36.822Z","repository":{"id":363203507,"uuid":"1255588267","full_name":"sulthonzh/git-batch","owner":"sulthonzh","description":"Run git operations across multiple repos at once. Zero deps.","archived":false,"fork":false,"pushed_at":"2026-06-16T20:41:28.000Z","size":20,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-16T22:25:00.914Z","etag":null,"topics":["batch","cli","git","monorepo","multi-repo"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sulthonzh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-01T01:52:04.000Z","updated_at":"2026-06-16T20:36:01.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/sulthonzh/git-batch","commit_stats":null,"previous_names":["sulthonzh/git-batch"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sulthonzh/git-batch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sulthonzh%2Fgit-batch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sulthonzh%2Fgit-batch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sulthonzh%2Fgit-batch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sulthonzh%2Fgit-batch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sulthonzh","download_url":"https://codeload.github.com/sulthonzh/git-batch/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sulthonzh%2Fgit-batch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34755061,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-24T02:00:07.484Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["batch","cli","git","monorepo","multi-repo"],"created_at":"2026-06-25T00:30:36.730Z","updated_at":"2026-06-25T00:30:36.816Z","avatar_url":"https://github.com/sulthonzh.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# git-batch\n\nRun git operations across multiple repos at once. Zero dependencies.\n\nYou know the drill — you've got 15 repos cloned locally and you need to pull them all. Or check which ones have uncommitted changes. Or switch to `main` across the board. Instead of writing a bash loop (again), just use `git-batch`.\n\n## Install\n\n```bash\nnpm install -g git-batch\n```\n\n## Commands\n\n| Command | What it does |\n|---------|-------------|\n| `status` | Show branch, commit, sync status for all repos |\n| `fetch` | `git fetch --all --prune` across repos |\n| `pull` | `git pull --ff-only` across repos |\n| `push` | `git push` across repos |\n| `checkout` | Switch (or create) branch across repos |\n| `stash` | Stash or pop changes across repos |\n| `exec` | Run any git command across repos |\n\n## Usage\n\n### See what's going on across all your repos\n\n```bash\ngit-batch status\n```\n\nOutput:\n```\nmy-app  main @ a3f2c1d\n  Add auth middleware (2 hours ago)\napi-server  feature/login @ b7e4a2f (3 changes) 2↑ 1↓\n  WIP: login endpoint (45 minutes ago)\nshared-lib  main @ c9d1e3a\n  Bump dependencies (1 day ago)\n```\n\n### Pull everything\n\n```bash\ngit-batch pull\n```\n\n### Pull with rebase\n\n```bash\ngit-batch pull --rebase\n```\n\n### Check a specific directory\n\n```bash\ngit-batch status --dir ~/projects --depth 2\n```\n\n### Create and switch to a new branch everywhere\n\n```bash\ngit-batch checkout -c feature/new-thing\n```\n\n### Stash dirty changes before switching\n\n```bash\ngit-batch stash\ngit-batch checkout main\ngit-batch stash --pop\n```\n\n### Run any git command\n\n```bash\ngit-batch exec --exec \"log -1 --oneline\"\ngit-batch exec --exec \"remote -v\"\ngit-batch exec --exec \"tag -l 'v1.*'\"\n```\n\n### JSON output (for scripts/CI)\n\n```bash\ngit-batch status --json\n```\n\n### Markdown output\n\n```bash\ngit-batch status --markdown\n```\n\n## Options\n\n| Flag | Description |\n|------|-------------|\n| `--dir \u003cpath\u003e` | Root directory to scan (default: `.`) |\n| `--depth \u003cn\u003e` | How deep to scan for repos (default: `1`) |\n| `--json`, `-j` | JSON output |\n| `--markdown`, `-m` | Markdown output |\n| `--rebase`, `-r` | Use `--rebase` with pull |\n| `--create`, `-c` | Create branch with checkout |\n| `--pop` | Pop stash instead of creating one |\n| `--exec \u003ccmd\u003e` | Git command to run (for exec) |\n\n## Programmatic API\n\n```js\nconst { resolveRepos, batchStatus, batchPull } = require('git-batch');\n\nconst repos = resolveRepos('/home/user/projects', 2);\nconst statuses = batchStatus(repos);\n\nfor (const repo of statuses) {\n  console.log(`${repo.name}: ${repo.branch} (${repo.dirty} changes)`);\n}\n```\n\n### API\n\n- `resolveRepos(root, depth)` — Find git repos under a directory\n- `batchStatus(repos)` — Get branch/commit/dirty/sync info\n- `batchFetch(repos)` — Fetch all remotes\n- `batchPull(repos, rebase?)` — Pull with ff-only or rebase\n- `batchPush(repos)` — Push to remotes\n- `batchCheckout(repos, branch, create?)` — Switch/create branches\n- `batchStash(repos, pop?)` — Stash or pop changes\n- `batchExec(repos, command)` — Run arbitrary git command\n- `getRepoInfo(repoPath)` — Get info for a single repo\n\n## Why\n\nI got tired of writing `for dir in */; do cd \"$dir\" \u0026\u0026 git pull \u0026\u0026 cd ..; done` every morning. This does that, plus shows you what's dirty, what's behind, and lets you run any git command across all your repos in one shot.\n\nZero dependencies because it's just `child_process` and `fs`. Works with Node 16+.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsulthonzh%2Fgit-batch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsulthonzh%2Fgit-batch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsulthonzh%2Fgit-batch/lists"}