Adds an Explorer context action and a lightweight custom view with an inline button next to each folder to open its Git remote (file or folder) URL in the default browser.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
A lightweight VS Code extension that lets you open the Git remote URL for any file or folder:
Built‑in Explorer:
Right‑click a file or folder ➜ Open Remote URL in Browser
Custom view: Explorer → Remote Folders shows your folder tree with:
🌐 icon indicator next to folders with remotes
Inline button (hover the item) to open remote URL
Refresh button in the view title
⌨️ Keyboard Shortcuts
Ctrl+Shift+O (macOS: Cmd+Shift+O) - Open remote URL for the selected file or folder in the Explorer or Remote Folders view
Ctrl+Alt+O (macOS: Cmd+Alt+O) - Open remote URL for the active file (or its containing workspace folder if no editor is open)
⚠️ Note: VS Code does not let extensions place clickable inline buttons on items in the built‑in File Explorer.
This extension provides the best possible UX: a native Explorer context menu action and a custom view that supports inline item buttons.
What it builds
For any file or folder inside a Git repo, we compute the appropriate remote URL and open it in your default browser, using conventions per host:
Branch detection uses your current HEAD from the built‑in Git extension; falls back to remoteFolders.preferBranch or HEAD.
Install (no packaging required)
Open this folder in VS Code.
Press F5 to launch the extension in a new Extension Development Host window.
In the dev host:
Right‑click a file or folder in the File Explorer → Open Remote URL in Browser.
Or open the Remote Folders view (in Explorer), hover a folder and click the inline icon.
If you prefer a .vsix:
Install vsce (npm i -g @vscode/vsce), then run vsce package inside the folder to produce a VSIX you can install via Extensions ▸ … ▸ Install from VSIX….
Settings
remoteFolders.exclude — Folder names to hide in the custom Remote Folders view.
remoteFolders.preferBranch — Fallback branch name to use when the current branch cannot be determined (e.g., "main").
Notes
Requires the built‑in Git extension (bundled with VS Code).
Works with multi‑root workspaces and nested repos (picks the deepest repo that contains the folder).
If multiple items are selected in the Explorer when you invoke the context action, each is opened.