VS Code Cozies Up To GitHub
Written by Sue Gee   
Tuesday, 15 June 2021

The Microsoft Devs for VS Code together with their counterparts at GitHub have come up with a way to browse and edit GitHub repositories quickly and safely inside VS Code, eliminating the need to first clone the repo.


The new facility is a VS Code extention called Remote Repositories and, when working on someone else's code for purposes such as browsing open-source repositories, reviewing pull requests or inspecting upstream dependencies to debug applications, it avoids the usual first step of cloning the repository locally. Instead, with Remote Repositories you can open source code repositories in VS Code instant and safe and proceed quickly to being able to browse, search, edit, and commit to any remote GitHub repository directly from within VS Code. The same facility is billed as coming soon for Azure Repos.

This video from the Visual Studio Code channel shows how to get started with Remote Repositories. It covers:

  • Installing the Remote Repositories extension
  • Opening a remote GitHub repo within VS Code without having to clone
  • Exploring  and editing the files in the repo
  • Commiting a change
  • Creating a pull request
  • Using Remote Repositories alongside the GitHub Pull Requests and Issues extension


There are some limitations to this way of working. Instead of cloning a file, which is then saved to your computer’s local file system, when working with Remote Repositories the code doesn’t live on your local computer - it’s still just on GitHub. You work with the code through a virtual file system, which is an abstraction that simulates having local files while getting the content from somewhere else- GitHub in this case - and when you interact with the code you do so in a virtual workspace on the virtual file system. You need to bear in mind that while the code doesn't live on your computer, your edits do. If you want to access your changes in GitHub, or on another machine, you will need to commit them.

Other limitations of Remote Repositories are:

  • Debugging, terminals, and tasks are not currently supported. Terminals open on your local file system and don’t have access to the virtual file system of the remote repository.

  • It provides only limited language intelligence - Features like IntelliSense and go-to-definition may be impacted as many languages don't yet understand the virtualized environment of Remote Repositories.

  • Full-text search requires a pre-built index for exact text matching, otherwise it will fallback to GitHub's fuzzy default-branch only native search.

  • Not all extensions can support running in a virtual workspace, but over time more extensions will support it. For example, extensions that depend on direct access to local files won't be able to support this.

Despite the limiatations this seems like a useful new facility. It lets you work on as many repos as you like without having to save any source code on your machine.

As Brigit Murtauagh and Eric Amodio point out in their blog post  Remote Repositories saves you time and local disk space and empowers you to stay entirely within VS Code for all your source control tasks.

Integrating VS Code with GitHub, and next Azure, makes Microsoft products more attractive. The idea of sitting down and treating GitHub as a local file system and simply getting on with programming is very attractive. VS Code may be open source, but it is also a marketing tool for Microsoft. However, can we really complain if the result is something worthwhile? After all, VS Code can't be held responsible for the fact that Microsoft owns GitHub - when it comes to Azure, however, the case is less pure.



More Information

Blog post about Remote Repositories

Remote Repositories

Related Articles

Microsoft GitHub - What's Different

Run VSCode in the Browser

Visual Studio Integrates GitHub Accounts

The Trap Snaps Shut - GitHub Codespaces

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.



Microsoft Introduces SharePoint Embedded VSCode Extension

Microsoft has released a preview version of a SharePoint Embedded Visual Studio Code extension, describing it as a new tool for developers who want to get started with SharePoint Embedded application  [ ... ]

Google Rebrands Bard With Subscription

Google Bard will from now on be known as Gemini, and Google is launching a paid subscription tier that will be based on yet another new AI model from Google. The move to a paid subscription follows th [ ... ]

More News

raspberry pi books



or email your comment to: comments@i-programmer.info

Last Updated ( Tuesday, 15 June 2021 )