This VS Code extension allows you to quickly switch or create branches across all repositories in a multi-repo workspace.
Features
Branch Switching: Select any existing branch to check out simultaneously across all repositories.
Fallback to Default Branch: If a local/remote branch doesn't exist, the extension checks out the user-defined default branch in that repository.
Branch Creation: Create a new branch in every repository at once.
Configurable Default Branch: Define your preferred default branch name (e.g. main or master) in VS Code settings.
Auto Pull After Checkout: Automatically pull updates from the remote branch of each repository after successful branch switches, get asked whether to do so or disabled.
Auto Reload Window: Automatically reload the window after successful branch switches, get asked whether to do so or disabled.
Usage
Press Ctrl+Shift+P or F1 (Windows/Linux) or Cmd+Shift+P (macOS) to open the Command Palette.
Run Multi-Repo Branch Switcher: Switch Branches.
The extension will get info on all local and remote branches of all repositories.
Choose an existing branch from the list or select Create New Branches for All Repos to define a new branch name.
You can filter the branches by typing in the command palette input:
For each repository, the extension will:
Check out the branch if it already exists locally.
Check out a remote-tracking branch if it exists on origin.
Otherwise, it will fall back to the configured default branch.
Choose whether to pull the most recent changes from each remote branch, if so configured
Choose whether to reload the window, if so configured.
Configuration
Open your VS Code settings (Settings → Extensions → Multi Repo Branch Switcher or in settings.json) and set: