How To Clone Git Repository In Visual Studio Code

A Visual Studio Code (VSCode) has an integrated source control management (SCM) system and supports Git out of the box.

Integrated Git support is one of the greatest features of the Visual Studio Code.

In this note i will show how to clone a Git repository in the Visual Studio Code.

Cool Tip: How to reset a Visual Studio Code! Read more →

Clone Git Repository In Visual Studio Code

Open VSCode and select a folder where to download the Git project to (Ctrl + K wait a second Ctrl + O):

Top Menu -> Files -> Open Folder...

Start the terminal (Ctrl + `):

Top Menu -> View-> Terminal

Execute the git clone command in the terminal:

PS C:\> git clone

Although VSCode has a great built-in functionality for Git, Git itself still has to be installed on your machine, otherwise you may receive an error as follows:

git : The term 'git' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the 
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ git clone
+ ~~~
    + CategoryInfo          : ObjectNotFound: (git:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Cool Tip: How to select and edit multiple lines simultaneous in VSCode! Read more →

Was it useful? Share this post with the world!

One Reply to “How To Clone Git Repository In Visual Studio Code”

  1. The last error message was useful

Leave a Reply