Hello Sunil
Visual Studio Code - How to use Git and GitHub

Visual Studio Code – How to use Git and GitHub

Step 1: To download a remote repository from GitHub, click on “Clone or Download” button, and copy the link provided.

Clone an existing repository from GitHub to VS Code

Step 2: Open “Command Palette” by pressing “CTRL+Shift+P”, then type “Git: Clone” and press enter.

Select git clone option from vs code command palette

Step 3: Enter remote repository URL and press enter.

Enter remote repo url and press enter - vs code

Step 4: Select the location where you want to store a copy of the repository on your local machine.

Select the location where you want to store a copy of the repository on your local machine.

Step 5: Click on “Open” button, which will open a local copy from your remote GitHub repository.

Click on open button which will open a local copy from your remote GitHub repository - vs code

Now you have successfully cloned a repository from GitHub in Visual Studio Code (VS Code)

Cloned repo from GitHub to work on local machine

How to remove a project from Git in Visual Studio Code (VS Code)

Let you have completed the project and want to close the Git repository. Then, you need to open “Command Palette” by pressing “CTRL+Shift+P” and select the option “Git: Close Repository”.

Select git close repository option from command palette - vs code

Then close Visual Studio Code (VS Code) by pressing “X” icon and navigate to the directory where you have stored local Git repository on your machine.

Delete .git directory - vs code

Delete “.git” directory from the system. By this way you can remove a project from Git on your local machine.

How to do advance Git operations in Visual Studio Code (VS Code) through plugins

Not only does Visual Studio Code (VS Code) come with lots of built in functionality for Git, there are also several very popular plugins available at Visual Studio Code Marketplace to add additional functionality that can make your Git workflow even more professional.

Here are the top Git recommended plugins which you can try:

Conclusion

Hopefully, you are starting to get a feel for the true power of Visual Studio Code (VS Code). While focusing on its Source Control integration for Git. Thanks for reading this article and if you have any questions or comments, then leave them below.

[yasr_visitor_votes size=”medium”]

Sunil Pradhan

Hi there đź‘‹ I am a front-end developer passionate about cutting-edge, semantic, pixel-perfect design. Writing helps me to understand things better.

Add comment

Stay Updated

Want to be notified when our article is published? Enter your email address below to be the first to know.

Sunil Pradhan

Hi there đź‘‹ I am a front-end developer passionate about cutting-edge, semantic, pixel-perfect design. Writing helps me to understand things better.