Fast multi-root Git sync. Switch, fetch, and pull across every repository in the workspace.
WGit is a VS Code and Cursor extension. You type wg sb and every repo moves to the branch you picked. A repo that only has origin/dev gets a local dev that tracks it. A repo that cannot move is skipped, with a reason, and the rest of the batch still runs.
repo | before | after | action | result | error
already-on | dev | dev | already-on | ok |
example-service | master | dev | create-track | ok |
no-dev | master | master | skip: missing-remote-branch | skipped |
dirty-repo | master | master | skip: dirty | skipped |
Multi-root workspaces drift. Most repos sit on dev. One of them is still on master. origin/dev exists. There is no local dev. “Switch all to dev” should create that tracking branch. It should not leave that repo on master and hide the reason in a toast.
WGit plans the operation before it changes any branch, then prints one row per repository.
Command Palette titles are exact, so fuzzy search can use the short code.
| Command id | Title | Type to run |
|---|---|---|
wgit.switchBranch |
WG: Switch Branch (sb) |
wg sb |
wgit.pullAll |
WG: Pull All (pa) |
wg pa |
wgit.fetchAll |
WG: Fetch All (fa) |
wg fa |
wgit.showStatus |
WG: Status (st) |
wg st |
wgit.refresh |
WG: Refresh (rf) |
wg rf |
The status bar shows WGit: N, where N is the number of repositories WGit can see. Click it to run Status. Logs and report tables go to the WGit output channel. Choose Show Details on the summary notification to open that channel.
Push-all is not in this version.
For a target branch X and the default remote (origin unless you change it):
- Fetch that remote when
wgit.fetchBeforeSwitchis on. - Show a confirmation with the counts: already on
X, switch to a local branch, create a tracking branch, skip dirty, skip missing. - For each repository, independently:
- Already on
X: leave the branch as it is (already-on). - Local
Xexists:git switch X. origin/Xexists:git switch -c X --track origin/X.- Neither exists: skip with
missing-remote-branch. - The tree is dirty and the checkout would move:
skip(default),stash, orfail, according towgit.dirtyPolicy.
- Already on
- When the repository is on
Xandwgit.pullAfterSwitchis on, rungit pull --ff-only. - Print the report. A pull or stash-pop failure is that repository’s failure. Other repositories are unchanged by it.
Running the switch again is safe. Repositories that landed on X report already-on.
Dirty means git status --porcelain is not empty, including untracked files. A dirty tree does not block a repository that is already on the target. If the target branch does not exist at all, the reason is missing-remote-branch even when the tree is also dirty.
git switch is preferred. On a Git that has no switch command, WGit falls back to git checkout. It does not use checkout -B when switch exists, because -B can move a branch that is already there.
wgit.dirtyPolicy is skip, stash, or fail.
wgit.scanNestedRepos looks through a workspace folder that is not itself a repository (up to five levels, skipping node_modules and other heavy directories). A workspace folder that is a repository is always included. Nested scan then checks only that folder’s immediate children, so a monorepo is not walked file by file.
WGit does not activate in an untrusted workspace, and it does not run in virtual workspaces. Git has to be on PATH. Fetch and pull use GIT_TERMINAL_PROMPT=0, so a missing credential fails that repository instead of hanging the batch on a prompt.
Download wgit-0.1.0.vsix from the v0.1.0 release. That file is attached when the v0.1.0 tag is pushed. GitHub Actions runs the tests, builds the VSIX, and publishes the release.
In Cursor or VS Code:
- Open the Command Palette.
- Run Extensions: Install from VSIX....
- Choose the downloaded
wgit-0.1.0.vsix. - Reload the window when the editor asks.
- Open a multi-root workspace, then run WG: Status (st) or type
wg st.
Trust the workspace when asked. The status bar should show WGit: N for the repositories it found.
To build the same file yourself:
git clone https://github.com/alpdogan/wgit.git
cd wgit
npm install
npm run packagenpm run package writes wgit-0.1.0.vsix in this directory. WGit targets VS Code and Cursor (engines.vscode ^1.85.0).
Publishing is manual. Create an Open VSX access token and, only when you intend to publish:
npx @vscode/vsce package
npx ovsx publish wgit-0.1.0.vsixVisual Studio Marketplace is optional after Open VSX. Use a Marketplace personal access token with vsce publish. Do not commit tokens. The publisher id in package.json is alpdogan, so the extension id is alpdogan.wgit.
npm test builds a temporary multi-root fixture and checks the Git outcomes below. The VSIX step is the editor check.
In a multi-root workspace:
- Most repositories are already on
dev. They stay ondevand the report saysalready-on. If they are behind the remote and pull-after-switch is on,git pull --ff-onlyupdates them. - One repository is on
master, hasorigin/dev, and has no localdev. It ends ondevtrackingorigin/dev(create-track). - One repository has no
devlocally or on the remote. It is skipped withmissing-remote-branchand stays on its current branch. - One dirty repository that would have to move is skipped with
dirtyunder the default policy. Its uncommitted changes stay in the working tree. - The final report lists every repository, with a reason on each row.
- In Cursor, Extensions: Install from VSIX installs the package, and the commands appear as
WG: ….
ericsonj/wgit is a separate command-line tool for using several Git accounts. This repository is an editor extension for syncing the repositories open in one workspace. The names collide. The projects do not.
Workspace-wide Git commands are the idea behind Multi-Repo Manager (MIT, published as Chuck-Studio.multi-repo-manager). WGit does not reuse that extension id, publisher, or branding. The switch path here is written for the remote-only branch case: create the local tracking branch, keep going when one repo fails, and show the plan and the report.
See CONTRIBUTING.md.
npm install
npm test
npm run typecheck
npm run compileLaunch Run WGit from the editor to try the extension host.
MIT © 2026 alpdogan

{ "wgit.maxParallel": 5, "wgit.fetchBeforeSwitch": true, "wgit.pullAfterSwitch": true, "wgit.dirtyPolicy": "skip", "wgit.scanNestedRepos": true, "wgit.defaultRemote": "origin" }