Adds an Open as Repository entry to the Explorer context menu (right-click on
any folder). The folder is registered in the Source Control panel via the
built-in Git extension's git.openRepository command, without changing the
current workspace.
Why
VSCode's Source Control view only auto-discovers Git repositories inside the opened workspace. When you want to monitor a Git repository that lives outside the workspace — a sibling clone, a build output tree, a vendored dependency — you currently have to open it in a new window or run a command from the palette. This extension surfaces the same action one right-click away.
Usage
- Right-click any folder in the Explorer.
- Choose Open as Repository.
- If the folder is a Git working tree, it appears in the Source Control panel.
Multi-select is supported: right-click after selecting multiple folders and each one is registered.
Requirements
- VSCode 1.85 or newer.
- The built-in Git extension (
vscode.git) must be enabled. It is by default; this extension declares it as a dependency.
Commands
| Command | Title |
|---|---|
openAsRepository.open |
Open as Repository |
Known Limitations
- The target folder must already be a Git repository. This extension does not
run
git init. - The Source Control panel scopes discovered repositories to the current window; closing and reopening the window may require re-registering.
Release Notes
0.0.1
- Initial release.