Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Remote Folder URL ButtonNew to Visual Studio Code? Get it now.
Remote Folder URL Button

Remote Folder URL Button

MariusStorhaug

|
1 install
| (0) | Free
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.
Copied to clipboard
More Info

Remote Folder URL Button

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:

Host Folder URL File URL
GitHub / GH Enterprise https://host/owner/repo/tree/<branch>/<path> https://host/owner/repo/blob/<branch>/<path>
GitLab https://host/owner/repo/-/tree/<branch>/<path> https://host/owner/repo/-/blob/<branch>/<path>
Bitbucket https://host/owner/repo/src/<branch>/<path> https://host/owner/repo/src/<branch>/<path>
Azure DevOps https://dev.azure.com/org/project/_git/repo?path=/path&version=GB<branch>&_a=contents same as folders

Branch detection uses your current HEAD from the built‑in Git extension; falls back to remoteFolders.preferBranch or HEAD.

Install (no packaging required)

  1. Open this folder in VS Code.
  2. Press F5 to launch the extension in a new Extension Development Host window.
  3. 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.

MIT © You

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft