How to clone git project with Visual Studio Code

I had to introduce Visual Studio Code and the built-in Git client to few teammates. They did not have any Microsoft tools and Git experience so I decided to create quick guide on how to download remote Git project repository with VS Code.

Here is how to clone remote Git repository with Visual Studio Code into a local folder


Open Visual Studio Code
Go to Top Menu -> Files -> Open Folder
Select the folder you would like to download the cloned project
Go to Top Menu -> View -> Integrated Terminal
Velin Georgiev blog image

Execute 'git clone' command with the path to the repository you would like to clone in the integrated terminal.  Example:
git clone https://bitbucket.org/velingeorgiev/rouge

If it requires credentials to login then the integrated terminal will ask for username and password.
Here is the complete output:
C:\Projects\TestProject>git clone https://bitbucket.org/velingeorgiev/rouge
Cloning into 'rouge'...
github --credentials get: github: command not found
Username for 'https://bitbucket.org': velin.georgiev@somemail.com
Password for 'https://velin.georgiev@somemail.com@bitbucket.org':
github --credentials store: github: command not found
github --credentials store: github: command not found
remote: Counting objects: 1082, done.
remote: Compressing objects: 100% (1000/1000), done.
Receiving objects: 100% (1082/1082), 3.98 MiB | 301.00 KiB/s, done.cts:  87% (942/1082), 3.88 MiB | 299.00 KiB/s

Resolving deltas: 100% (587/587), done.

C:\Projects\TestProject>

The cloned files are already available into the local folder.

Velin Georgiev blog image

Cheers,
Velin

Comments