Using multiple Git repositories in a single Team Foundation Server project

I’ve started using Team Foundation Service 2012 (The cloud based offering) now that they have announced support for using Git as a source control solution.

My initial test was a single projected with a single Git repository named after the project.

  • github: server certificate verification failed
  • Where file is ignored by .gitignore
  • Connecting one Github repository to several Aptana projects
  • What is `git diff --patience` for?
  • svn vs git shallow (sparse) checkout - branching, commit
  • Unable to create '/git/index.lock': File exists - but it doesn't
  • Everything went well, I could clone the repo, commit push and pull from within Visual Studio 2012 and more importantly the work item association worked as well.

    For the real project however, it made more sense to split the codebase across multiple Git repos in the TFS project.

    There was no obstruction in doing this, the interface for Team Foundation Service supported it quite nicely….


    Now I find that in Visual Studio 2012 there are a few issues and I wonder if I’ve either done something wrong, or if its just something that is not fully supported (yet?)

    • After testing, I’ve found that if the Git repo does not have the same name as the project then you lose the ability to clone the repo easily. The default URL that comes up always assumes the Git repo is named after the projected.
    • Likewise, when the repo does not have the same name, you completely lose the ability to associate work items with commits. It also displays “(Local)” after the Git repo name, as if it has no idea that its actually associated with the TFS Project at all.

    Anyone else find this and perhaps a solution (while still allowing multiple Git repos under the same TFS Project) ?

    Found a few links such as these two

    So at least one other person has bumped into it.

    The multiple repo’s work fine if you use Git to push remotely to the correct repo URL, it only breaks down if you use the Visual Studio 2012 integration in terms of work item association and cloning the repo.

  • Error when trying to use svn2git on Windows
  • git error: cannot initialize work tree
  • Git: progress bar on commit?
  • How do I expand a built in Git command with an alias?
  • Creating Git branch tag in VSO or VS2015
  • How to organize separate client and server repositories for both development and deployment?
  • 2 Solutions collect form web for “Using multiple Git repositories in a single Team Foundation Server project”

    This is a limitation of the Visual Studio Tools for Git extension that is available for Visual Studio 2012.

    enter image description here

    This problem does not exist in the Git tools that come as part of Visual Studio 2013.

    Make sure when you Connect>ManageConnections>
    that you click on the repo (under the project) rather than just the project.

    For a project with just one repo in, VS works it out.

    Git Baby is a git and github fan, let's start git clone.