Skip to main content

Installing GitHub in Visual studio Code for Windows 10

Installing GitHub in VS Code

Visual Studio Code has become the preferred code editor for most developers around the globe. Its popularity is surging every passing minute. Thanks to its attractive array of features like Intellisense that have made it indispensable for developers.

Like VS Code, GitHub is also imperative for the developer community. Hence it is very important to know how to install GitHub in the Visual Studio Code. For the uninitiated, GitHub is a web-based hosting service based on the Git Version Control System.

Before installation, it is essential to check whether Git is installed on Windows. To verify, open the command prompt of windows by pressing the Windows key and R.
Command Prompt


Inside command prompt, type git --version to know the version of Git installed. If Git is not installed, the command prompt will return a message as shown in the image below.
Command Prompt

Now open the VS Code and go to Source Control of its activity bar. In a system where Git is absent, 'No source control providers registered' message will be displayed.
VS Code Source Control


Git Installation for Windows

Let's download git from https://git-scm.com/downloads
Git for windows webite


Run the .exe file downloaded from the Git website. Follow the image sequence given below for installing Git in Windows 10.
Git Installation


Git Installation


Git Installation

Git Installation



Git Installation


Git Installation


Git Installation


Git Installation




Git Installation


Git Installation


Now that the Git is installed, let's verify the same by opening Git Bash.
Git Bash


To clone a repo from GitHub using the VS Code 



Step 1: Select a repository in GitHub and click on the green button at the top right corner that reads clone or download. Copy the link that appears on the drop-down bar.
Clone repo GitHub




Step 2: Open VS Code, Go to File -> Add Folder to Workspace...
VS Code

Add the newly created folder.
VS Code

VS Code interface will resemble the image below:
VS Code

Step 3: Open the terminal.
VS Code



Step 4: To link your GitHub account, type git config --global user.name <GitHub user ID>
To link your GitHub account, type git config --global user.name <GitHub user ID>

Step 5: type git clone <url copied from GitHub during Step 1> to clone a repo from GitHub using VS Code.
VS Code

On completion of the installation, the VS Code user interface will be as shown in the image below.
VS Code

Go to Source Control of activity bar to verify whether Git has been installed correctly. If installed correctly, the UI will resemble the image below (SOURCE CONTROL: GIT can be seen on the top left of the underlying image).
VS Code Source Control

I hope you guys find the information helpful. Watch this space for more updates on VS Code tips and tricks. Happy Coding!!!

Comments