You open a GitHub repository in VS Code without cloning by using the GitHub Repositories extension. VS Code presents the repository through a virtual file system, so you can browse, search, edit, and commit without creating a local Git clone.
This is ideal for reviewing pull requests, making quick documentation fixes, or exploring a codebase before deciding whether to clone it.
What you need
For desktop VS Code, install the GitHub Repositories extension, published by GitHub with ID github.remotehub. Sign in to GitHub when prompted and review the requested account authorization, especially before opening a private repository.
In a browser, open https://vscode.dev/github/<owner>/<repository>. The vscode.dev GitHub experience is powered by GitHub Repositories, so a separate desktop installation is not required.
Step 1: Open the repository
Run GitHub Repositories: Open Repository... from the Command Palette. Choose Open GitHub Repository... and paste a URL or type an owner/repo name. Press Enter.
Step 2: What you can and cannot do
The GitHub Repositories extension creates a virtual file system. VS Code reads file contents from GitHub on demand.
What works and what does not
You can browse files, search across the repository, edit and save files, commit and push changes directly to GitHub, create pull requests, and switch branches without stashing.
You cannot run tasks, debugging, or an integrated terminal in this virtual workspace. Language intelligence and extension support are limited because many tools require direct access to local files or a runtime.
Your working changes exist in the virtual workspace. When you commit, the extension sends that commit directly to GitHub, so there is no separate push step.
Working changes are kept independently by branch. You can switch branches without stashing and return to the original branch to continue its pending changes.
Step 3: Commit and push changes
Edit files as you normally would. When you are ready to commit:
Review the changes
Open the Source Control view with Ctrl+Shift+G on Windows or Linux, or Cmd+Shift+G on macOS. Open each changed file and check its diff.
Write the commit message
Enter a concise message in the Source Control input.
Commit to GitHub
Select Commit and confirm any prompt. The extension sends the commit directly to GitHub.
The commit is sent directly to the remote repository. Review the changed files and target branch first. To use a pull request instead of committing to the current branch, select Create Pull Request in the Source Control view and follow the prompts to create a branch and PR.
Step 4: Switch to a full development environment
When you need terminals, debugging, or language extensions, use the Continue Working On command. This moves your work from the virtual file system to a real local or cloud environment.
Open the Command Palette and run Continue Working On. You can choose to:
- Clone Repository Locally: clones the repository to your machine and opens it with full VS Code capabilities.
- Clone Repository in Container Volume: requires Docker and the Microsoft Container Tools integration offered by the current workflow.
- Create a GitHub codespace: requires the GitHub Codespaces extension and access to Codespaces.
If you have uncommitted changes in the virtual file system, the Cloud Changes feature offers to carry them over to your new environment. Your pending changes are temporarily stored on the same service used for Settings Sync and applied when the new environment opens. The stored changes are deleted from the service once applied.
Using the Remote Explorer for quick reopens
The Remote Explorer, accessible from the Activity Bar, keeps a list of repositories you have opened remotely. Click any entry to reopen it instantly without searching again.
You can also click the remote indicator in the bottom-left Status Bar and select Open Remote Repository to access the same command.
Practical use cases
Reviewing a pull request. Paste the PR URL after running GitHub Repositories: Open Repository.... VS Code opens the PR branch. You can browse the changed files, leave comments if you also have the GitHub Pull Requests and Issues extension installed, and approve or merge.
Quick documentation fix. Open the repository, correct the file, review the diff, and use a pull request when the repository's collaboration policy requires one.
Exploring an unfamiliar codebase. Before cloning a large repository, open it remotely to browse the structure, read the README, and decide if it is worth downloading.
Editing without a full local checkout. Repository content is loaded through GitHub APIs, while your working edits remain on the client until committed. This avoids storing a complete clone.
Troubleshooting
Repository does not open or loads a blank window. Check that you are signed in to GitHub. Open the Command Palette and run GitHub: Sign In if you are not already authenticated. For private repositories, verify that your GitHub account has access.
Some files show as binary or do not display. Very large files or binary files may not render in the virtual file system. This is expected. Clone the repository locally if you need to inspect these files with specialized tools.
Search is incomplete or slow on a large repository. Exact full-text search depends on a prebuilt index. Without one, the extension falls back to GitHub search, which is fuzzy and limited to the default branch. Clone the repository when complete local search is required.
Next, learn how to clone a repository and work with it locally for full development, or set up a Dev Container to combine remote browsing with a containerized environment.
Rune AI
Key Insights
- Install the GitHub Repositories extension with ID github.remotehub for desktop VS Code.
- Run GitHub Repositories: Open Repository... and paste a GitHub URL or search by name.
- Browse, edit, and commit through a virtual workspace without a local clone.
- Terminals, tasks, and debugging are unavailable, while language and extension support is limited.
- Use Continue Working On when you need a full development environment.
Frequently Asked Questions
Can I run a terminal or debug code in a remote repository?
What happens when I commit?
Can I open private repositories?
Conclusion
GitHub Repositories is useful for browsing, reviewing, and making small edits without a local clone. Use Continue Working On to move to a local clone, container volume, or codespace when the task needs a terminal, debugger, tasks, or broader extension support.
More in this topic
How to Use VS Code with WSL 2 on Windows
Run VS Code connected to Windows Subsystem for Linux so you can develop in a full Linux environment with native tools, terminals, and debugging, all from Windows.
20 Best VS Code Extensions for Web Developers in 2026
Twenty carefully chosen VS Code extensions every web developer should know. Covers formatting, linting, frameworks, debugging, Git, and developer experience.
How to Install, Disable, Update, and Uninstall VS Code Extensions
Learn how to install, disable, update, and uninstall VS Code extensions from the Marketplace and the command line. Step-by-step instructions for every action.