Virtual Repos is a Visual Studio Code extension that allows to open and edit a remote repository (e.g. on GitHub) without cloning, committing or pushing your changes. It all happens automatically.
The extension is still missing lots of features I want to add (as time permits) and you can expect bugs (but hopefully nothing destructive), anyway this is a preview
extension and you can expect bugs here and there. Please report bugs or issues and ask for features you would like to see. Check Changelog for the latest status, what's planned and what has already been released.
Install the extension from the VSCode Marketplace.
Use the Open repository
command to open an existing repo from GitHub, you can choose from three options:
-
Open repository
: open any repository you have access to, enter the name asowner/repoName
Note: If you just enter the repo name, the extension assumes you own it, this is the same as using
Open my repository
-
Open my repository
: open a repository from a list of repos you own -
Open starred repository
: open one of your Starred repos
The repository will load automatically (of course, make sure you are connected to the Internet), you can then browse it, open, edit, add, delete files as if they where on your local file system even without cloning the repo.
open repository
open my repository
You can sync your open repositories across multiple devices by enabling Settings Sync in Visual Studio Code.
Node: you may need to Refresh the Virtual Repos view to see the latest repos added or removed from another machine.
You can create a new repository (public or private).
If you opened a repository you do not own, you can now fork it from the context menu. Once forked, the repository is automatically added to the Virtual Repositories list.
If you opened a repository you do not own, you can now star or unstar it. The list of starred repositories is automatically refreshed from GitHub every hour.
If you opened a repository you do not own, you can follow or unfollow its owner. The list of followed users is automatically refreshed from GitHub every hour.
Changes are committed automatically after the file is saved. The commit message is VirtualRepos: update file <filePath>
.
Public repositories are represented with a $(repo)
icon from from your IconTheme or the built-in codicon
, while private repositories use a $(lock)
icon.
Forked repos use a $(repo-forked)
icon instead, to clearly identity an open repository as a fork. This also helps distinguish between the upstream
repository (represented with the repo
icon) and my fork (represented with the repo-fork
icon):
You can get basic details about a repository by hovering the mouse on it:
You can identity repositories using their GitHub owner's avatar, just switch VirtualRepos.UseRepoOwnerAvatar
to true
(default is false
) to replace the standard repo icon with the repo owner's GitHub avatar:
The extension uses the built-in Output Channel to enable local tracing to a channel called "Virtual Repositories". This data is local only, it does not leave your machine.
You can control the tracing level or disable, for all Output Channels or for specific extensions, using the built-in command Developer: Set Log Level...
:
The extension uses the following GitHub authentication scopes
user:email
: needed to authenticate to GitHubuser:follow
: needed to follow/unfollow a user on GitHubrepo
: needed to create and update repositories (and their content) for the authenticated userdelete_repo
: needed to delete repositories
- Virtual Gists: Virtual Gists is a Visual Studio Code extension that allows to open and edit a remote gist (e.g. on GitHub) without cloning, committing or pushing your changes. It all happens automatically
- Virtual Git: VSCode extension path with my extensions to work with virtual repositories and gists based on a virtual file system
- Text Toolbox: Collection of tools for text manipulation, filtering, sorting etc...
- File System Toolbox: VSCode extension to work with the file system, path auto-complete on any file type
- Changelog Manager: VSCode extension, helps to build a changelog for your project, either in markdown or plain text files. The changelog format follows Keep a changelog
- Hogwarts colors for Visual Studio Code: Visual Studio theme colors inspired by Harry Potter, Hogwarts and Hogwarts Houses colors and banners
Virtual Repositories is freely inspired by these fine extensions: