Add a GitHub Repository to VS Code

In this blog post, I will show you how to add a GitHub repository to VS Code on Windows or macOS.

Adding a GitHub repository to Visual Studio Code (VS Code) can significantly streamline your development workflow.

Whether working on a personal project or collaborating on a team, integrating GitHub with VS Code allows you to access and manage your codebase directly from your editor.

Copy Repo URL

The first step in adding a repository to VS Code is copying the repository URL from GitHub.

I will copy the URL from the Clone or download the link in Github, as shown below.

VS Code

From VS Code, I will open the Command Palette from the View menu as shown below.

In the Command Palette, I will type Git: Clone and paste the repository URL.

At this stage, VS Code will ask me to select a location to save the repository, and the sync will start.

VS Code will allow me to open the repository in an existing or a new window.

Success! You're on the list.