VS Code / Cursor extension that adds Sync all for every Git repository in the workspace: one action in the Source Control → CHANGES header, then fetch → pull/push according to your settings.
Requires the built-in Git extension (vscode.git) and VS Code ^1.85 (see engines in package.json).
Where is the button?
- Menu:
scm/title, groupnavigation - Visibility:
when: view == workbench.scmso the control appears on the CHANGES view title bar only (same idea as the built-in tree/list toggles), not duplicated on each repository row for this command.
Native Git icons on each repo row (sync, pull, push, etc.) are not from this extension; you can hide those separately via the toolbar context menu or Git-related settings.
Behavior
- Uses the Git extension API only (
repo.fetch(),repo.pull(),repo.push()), notgit.*palette commands, so you should not get a “Choose a repository” picker from this flow. - Fetches all detected repositories (parallelism from settings).
- Optionally skips dirty repos and optionally processes only repos that are ahead or behind their upstream (defaults: skip dirty = on, only if ahead/behind = on).
- For each selected repo: pull if behind, push if ahead (parallelism from settings).
- Writes a full log to Output → “Sync All Repositories” (
[OK]/[FAIL]per path).
Features
- Single Sync all entry next to other CHANGES actions (Codicon
repo-syncon the command). - Configurable parallelism and filters (see below).
- Extension icon:
media/icon.png— 128×128 PNG (square) recommended; referenced frompackage.json→"icon".
Usage
- Open Source Control (CHANGES).
- Click Sync all in the header toolbar, or run the command Git: Sync All Repositories from the Command Palette (
Cmd+Shift+P/Ctrl+Shift+P).
Settings
| ID | Default | Description |
|---|---|---|
syncAllRepos.maxParallel |
4 |
Max repositories to process in parallel. |
syncAllRepos.onlyIfAheadBehind |
true |
After fetch, only sync repos that are ahead or behind upstream. |
syncAllRepos.skipDirty |
true |
Skip repositories with local changes. |
Development
cd sync-all-repos
npm install
npm run compile
Use Run → Start Debugging to try the extension in a new Extension Development Host window.
Packaging (VSIX)
cd sync-all-repos
npm install
npm run compile
npx vsce package
Install the generated .vsix in Cursor/VS Code: Extensions → … → Install from VSIX….
Notes
- Some repos may fail (conflicts, auth, missing remotes, etc.). Failures are listed in Output → Sync All Repositories; other repos still run.
- If
repo.fetch/repo.pull/repo.pushare not exposed by the Git API in your environment, those steps will error; check the Output channel for messages.