Skip to content

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

License

Notifications You must be signed in to change notification settings

carlocardella/vscode-VirtualRepos

Repository files navigation

Virtual Repos

preview

Visual Studio Marketplace Version Visual Studio Marketplace Installs Visual Studio Marketplace Downloads Visual Studio Marketplace Rating GitHub issues GitHub license Twitter

Download for VS Code

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.

Getting started

Install the extension from the VSCode Marketplace.

Repository management

Open a repo

Use the Open repository command to open an existing repo from GitHub, you can choose from three options:

  1. Open repository: open any repository you have access to, enter the name as owner/repoName

    Note: If you just enter the repo name, the extension assumes you own it, this is the same as using Open my repository

  2. Open my repository: open a repository from a list of repos you own

  3. 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 repository

open my repository

open my repository

Sync repositories across devices

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.

Create new repo

You can create a new repository (public or private).

create private repo

Fork repository

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.

Star/Unstar repository

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.

Follow/Unfollow a user

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.

Automatic commits

Changes are committed automatically after the file is saved. The commit message is VirtualRepos: update file <filePath>.

Easily identify forked and private repositories

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):

image

Get repository info

You can get basic details about a repository by hovering the mouse on it:

image

Repo owner's avatar

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:

UserRepoOwnerAvatar

Tracing

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.

image

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...:

image

GitHub authentication scopes

The extension uses the following GitHub authentication scopes

  • user:email: needed to authenticate to GitHub
  • user:follow: needed to follow/unfollow a user on GitHub
  • repo: needed to create and update repositories (and their content) for the authenticated user
  • delete_repo: needed to delete repositories

My other extensions

  • 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

Acknowledgements

Virtual Repositories is freely inspired by these fine extensions:

About

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

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published