News

New VS Code Tool Eases GitHub Browsing/Editing, No Cloning Required

A new Remote Repositories preview extension lets developers working in Visual Studio Code remotely browse and edit GitHub repos, without having to clone them locally and then open them up in the popular, open source-based code editor.

After Microsoft acquired GitHub some three years ago, it has been strengthening the ties between the code-repository service and its dev tooling.

Remote Repositories is the latest example of that, with its VS Code marketplace description stating it "lets you quickly browse, search, edit, and commit to any remote GitHub repository directly from within Visual Studio Code." Normally, developers would need to clone a repo to their local machine and then open it up to work with its code. "Cloning repos takes time and maintenance, as your local copy can quickly become out of date if you don't pull changes regularly. Plus, if you don't know the codebase you're cloning, there may be security risks involved too!" the site says.

Remote Repositories
[Click on image for larger view.] Remote Repositories (source: VS Code Marketplace).

Scenarios where the new tool can be put to use include:

  • To browse, learn, or search a codebase or parts of one, either as it exists today or at any point in history, directly in VS Code.
  • To create, edit, and review documentation, blog posts, notes, etc., using VS Code's powerful Markdown editor.
  • To make changes that don't require building or running tests, although validations can still run in GitHub Actions triggered on commit.
  • To quickly review pull requests (PRs), without having to check-out or in any way affect your local setup.

While the tool in its preview stage now works just with GitHub, Microsoft says support for Azure repos is coming soon.

Also, there are limitations to its functionality, including:

  • Debugging, terminals, and tasks: Not currently supported. Terminals open on your local file system and don't have access to the virtual file system of the remote repository.
  • 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.
  • Search: GitHub search itself has limitations, such as not indexing branches. Remote Repositories can avoid this limitation and perform a full-text search by enabling indexing. Indexing pulls a shallow clone of the repository from GitHub and performs a full search locally, providing greater power than GitHub's fuzzy default-branch native search. You can enable indexing in Remote Repositories from the Search view.
  • Extension limitations: Not all extensions can support running in a virtual workspace, but more extensions will support it over time. Extensions that depend heavily on access to local files cannot support this setup.

"We are just getting started on this journey, so expect the feature set to grow and the limitations to shrink as we continue development," Microsoft said in a June 10 announcement. As of this writing, it has been installed more than 14,000 times.

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • Compare New GitHub Copilot Free Plan for Visual Studio/VS Code to Paid Plans

    The free plan restricts the number of completions, chat requests and access to AI models, being suitable for occasional users and small projects.

  • Diving Deep into .NET MAUI

    Ever since someone figured out that fiddling bits results in source code, developers have sought one codebase for all types of apps on all platforms, with Microsoft's latest attempt to further that effort being .NET MAUI.

  • Copilot AI Boosts Abound in New VS Code v1.96

    Microsoft improved on its new "Copilot Edit" functionality in the latest release of Visual Studio Code, v1.96, its open-source based code editor that has become the most popular in the world according to many surveys.

  • AdaBoost Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the AdaBoost.R2 algorithm for regression problems (where the goal is to predict a single numeric value). The implementation follows the original source research paper closely, so you can use it as a guide for customization for specific scenarios.

  • Versioning and Documenting ASP.NET Core Services

    Building an API with ASP.NET Core is only half the job. If your API is going to live more than one release cycle, you're going to need to version it. If you have other people building clients for it, you're going to need to document it.

Subscribe on YouTube