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