How To Setup Git Repository in Visual Studio 2015

TechnoBrains
Learn & Share
Published in
3 min readMay 28, 2018

Lets setup a git repository in Visual Studio 2015….

Let’s clone a repo into our local file system in visual studio

Here is the things you need

  • A git Url to clone repo from
  • Credentials for git server

Let’s get started

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://admin@server/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 test repository has been selected as repository.

We did it. Yay !!

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

Originally Published by TechnoBrains: http://www.technobrains.net/setup-git-repository-visual-studio-2015/

--

--