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.

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

Step 3: Enter remote repository URL and press enter.

Step 4: 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.

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

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”.

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 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”]

By 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.

Leave a comment

Your email address will not be published. Required fields are marked *

Exit mobile version