18

I'm currently using tfs service for a project which involves several different parts (i.e. a website, a phone app etc). Some of these parts really belong in their own repositories, especially as some are .net and some are java / android.

Is there any way to add multiple git repositories to a team project in tfs / tfs service?

I could create independent team projects, but I'd rather not have to do that.

Matt Whetton
  • 6,616
  • 5
  • 36
  • 57

1 Answers1

23

You can create multiple git repositories under a single Team Project. Navigate to the Code Explorer, and locate the repository chooser in the web interface and select Manage Repositories...

Repository Chooser

From the repository manager, you can add a new repository:

enter image description here

This, of course, is provided that the Team Project uses Git as the version control provider - you can't mix and match Git repositories and Team Foundation Version Control in a single Team Project.

Edward Thomson
  • 74,857
  • 14
  • 158
  • 187
  • 4
    You can do this but be aware it breaks integration with Work item tracking if the repo has a different name to the project. I'm using Visual Studio 2012 Update 3 and you can only associate/link a commit with a TFS work item if the repo has the same name as the project. – nrjohnstone Aug 15 '13 at 18:44
  • 3
    As @nrjohnstone mentioned, this appears to be a major current limitation. I asked a followup question about "How do we connect to TFS from all Git repositories in a Team Project?" http://stackoverflow.com/questions/22616639/how-do-we-connect-to-tfs-from-all-git-repositories-in-a-team-project – Cameron Taggart Mar 24 '14 at 17:44
  • The link in the comment above by @CameronTaggart shows how to get all of the TFS integration working with multiple repos :) – deadlydog Jun 05 '14 at 17:22
  • 1
    Obviously this question is pretty old, but I'll just point out that you can now mix TFVC and Git repositories in the same team project. – Soren Bjornstad Sep 20 '19 at 16:44