Andry
Andry

Reputation: 16875

How to connect a TFS project to an existing Git repository

I have my Git account and there I have a repository. After a while I decided to start using Visual Studio Team Services to initiate a work tracking process for my team.

However when I create a new project

enter image description here

And select the Git option, a new repository is created. I tried changing the repository, but in the administration tools of the project I can create new repositories.

How can I associate a project to an existing Git repository?

Upvotes: 0

Views: 2465

Answers (2)

Daniel Mann
Daniel Mann

Reputation: 59055

Take your existing repo, add a new remote, and push it.

git remote add vsts https://<account name>.visualstudio.com/_git/<repo name>

then

git push -u vsts --all

Upvotes: 5

VonC
VonC

Reputation: 1328322

TFS 2015/Visual Studio 2015 would manage its own Git repos.

So try instead to push your existing repo to that new one, instead of making TFS reference your previous remote repo.

As mentioned in "Creating Git repositories with Team Services":

You can also create a local repository from a local folder using Git's init command and then push the repo to Team Services.

Upvotes: 1

Related Questions