Let’s clone a repo into our local file system in visual studio
Here is the things you need
I am going to use our local Git server for this tutorial.
First let’s get a URL to clone repository from,
In my case url is http://[email protected]/git/TestRepo.git
Let’s move to Visual studio. Once Visual studio is open don’t open any projects.
First we make sure our default Version control is GIT by going into Tools > Options > Source control
Select Git in current source control plugin dropdown
Then open team explorer. If you don’t find it then goto View > Team Explorer
You’ll see a panel in right (may depend on appearance settings)
In local Git Repositories Select Clone
Paste repository URL in first text-box and second text-box suggests local path to that repository, you can change if you want.
after that unchecked Recursively clone sub-modules checkbox and hit clone.
you will be asked username and password for the server you are accessing repo from. once that is successfully authenticated you will see a process bar going that represents that visual studio is copying files from server.
Give it some time
Once that is done. you will see a message like “The repository was cloned successfully”.
after that you will see your repository in list below.
Just double click on that and you will see a screen like this.
This means TestRepo has been selected as repository.
If your repository has any solution file in it then it will be show up in solutions section. You can just double click on that start your work.
if your repository is in bit-bucket then you can take URL from text-box given in screenshot below
if your repository is in GitHub then you can take url from textbox given in screenshot below