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 Visual Studio Code.
In this note i will show how to clone a Git repository in Visual Studio Code.
Clone Git Repository In Visual Studio Code
Open VSCode and select a folder where to download the Git project to (
K wait a second
Top Menu -> Files -> Open Folder...
Start the terminal (
Top Menu -> View-> Terminal
git clone command in the terminal:
PS C:\> git clone https://github.com/path/to/repo.git
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 https://github.com/path/to/repo.git + ~~~ + CategoryInfo : ObjectNotFound: (git:String) , CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException