SnowStorm
SnowStorm

Reputation: 385

In VisualStudio 2017 in some projects I can't see "Repository Settings" in team explorer setting section

I want to add existing project to remote git repository, but I can't see "Repository Setting" in team explorer setting section and I can't find any menu to add remote repository.

"Repository Setting" exists in other projcts

Upvotes: 1

Views: 2889

Answers (2)

Go to existing project from Powershell (or CMD) with cd command (project root folder which same name with git repository), and type git init.
After that close Visual Studio and reopen again.
Open Team Explorer for that project and choose Settings, You can see that time `Repository Settings``.

Upvotes: 0

Chad B
Chad B

Reputation: 1506

Git Repository Settings will only be available in the Team Explorer Settings page if a local Git repository is open in Visual Studio.

If you have already cloned the repo locally, opening a solution inside the repo will cause VS to detect the repo. Alternatively, you can add the repo to VS via "Team Explorer->Connect->Local Git Repositories" and click the Add link. Navigate to the location of the local repo on disk, and add it the known list of repositories.

If you have not already cloned the remote repo locally, then the next steps depend on where the repo is hosted. For Azure DevOps, you can use "Team Explorer->Connect->Manage Connections" to locate and clone the repo. For GitHub, there is a similar browse experience available as long as the GitHub for VS extension is installed.

The ability to clone via URL is also available in "Team Explorer->Connect->Local Git Repositories". Click the Clone link and paste the URL.

Hope this helps.

Upvotes: 2

Related Questions