A lightning-fast, zero-dependency extension to open your Git repositories, branches, and active files in the browser. Natively parses ~/.ssh/config to handle multi-profile host aliases.
⚡ Quick Start
- Install from the Open VSX Registry | VS Marketplace
- Open your git project repository local folder
- Click the
globestatus bar button to open in browser
🚀 Installation
The VSIX package is availabe at Open VSX Registry. | VS Marketplace
- Open VS Code
- Go to Extensions
- Search for
Git - Open Remote Repo/Files in Browserand select this extension - Click Install
✨ Features
- Multi-Profile SSH Support: Say goodbye to 404 errors caused by
[email protected]URLs. This extension natively parses your~/.ssh/configfile to resolve aliases to their true domains before opening the browser. - Smart Status Bar: The status bar icon dynamically adapts to your workflow. If a file is active, it opens the file. If no file is focused, it opens the repository root.
- Line Highlighting: Select lines of code in your editor, trigger the extension, and the browser will open directly to those highlighted lines.
- Zero Bloat: Built completely dependency-free using pure JavaScript and native Node modules. No sluggish wrappers or heavy background processes.
- Local Branch Protection: Warns you if you attempt to open a file on a branch that hasn't been pushed to a remote yet, offering to open the root repository instead.
🚀 Usage
You can trigger the extension from wherever you are working:
- Status Bar: Click the
repoorglobeicon in the bottom-left corner. - Editor Context Menu: Right-click anywhere inside an open file or on the file's top tab.
- File Explorer: Right-click any file or folder in the VS Code sidebar.
- Command Palette (
Ctrl+Shift+P): Search forGit Open: Repository in BrowserorGit Open: Current File in Browser.
⚙️ Extension Settings
This extension contributes the following settings to tailor it to complex environments:
gitOpenRemoteRepoFileInBrowser.statusBarAppearance: (Default:Icon + Text). ChooseIcon Onlyto hide the text label and save valuable space in your VS Code status bar.gitOpenRemoteRepoFileInBrowser.defaultRemote: (Default:origin). If your repository has multiple remotes (e.g.,originandupstream) and the current branch does not have an explicit tracking remote, the extension will default to this value.gitOpenRemoteRepoFileInBrowser.customProviders: (Default:{}). If you use a self-hosted enterprise Git server (e.g.,git.internal-corp.com), you can map it to a known provider so the URL formats correctly. Supported target formats aregithub,gitlab, andbitbucket. (Note: If left unconfigured, unknown domains automatically fall back to the standard GitHub URL format).
Example settings.json configuration:
{
"gitOpenRemoteRepoFileInBrowser.customProviders": {
"git.mycompany.com": "gitlab",
"source.internal-corp.net": "bitbucket"
}
}
✨ Other Related VSX Family Extensions
-
Git SSH Config Manager - Open VSX Registry | VS Marketplace
-
Git Profile-Protocol Switcher - Open VSX | VS Marketplace
-
Git Repo Manager - Open VSX Registry | VS Marketplace
-
Git Snapshots - Open VSX Registry | VS Marketplace
-
Git Pull Agent - Open VSX Registry | VS Marketplace
-
Backup File - Open VSX Registry | VS Marketplace
-
Tagged File Snapshots - Open VSX Registry | VS Marketplace
-
Tagged Snapshots - Open VSX Registry | VS Marketplace
-
Backup Folder - Open VSX Registry | VS Marketplace
☑️ Requirements
- VS Code (family) v1.85.0 or higher.
- Git installed on your system.
⚖️ License
MIT