Git repo and Visual Studio 2017

When using Git as the source control system within Visual Studio, if you use a different location to create your local repos than the default it can be a pain to amend it each time.

This post will show how the default repo location can be updated…

The default location for Git repos in Visual Studio is:
C:\users\<user name>\Source\Repos

If you want to change this then follow these steps:
Open Team Explorer.
Click the Home button.

Then click Settings.

Then Global Settings.

Now set the Default Repository Location to a folder of your choice.

Click Update.

If there are no current local repositories, then Settings will not be available. In which case, click Manage Connections and then connect to your project in a hosted repo e.g. Azure DevOps.

You then need to clone the repo to your local machine. To do this click the “Clone Repository” underneath Project in Team Explorer.

Define the local path where you wish to create the local repo and click “Clone”.

Once the cloning process has completed, you can then go back and follow the steps to amend the default repo location.

Hope that helps saves some time and removes one tedious task when using Git with Visual Studio.

If you have any useful suggestions for Visual Studio, Git or Azure DevOps then I’d love to to hear from you so leave a comment below.


Posted

in

,

by

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *