次の方法で共有


Many Git Repositories, but one Team Project to rule them all

One of our current objectives is to dogfood one Team Project, with one default and eight feature Teams, each with its own Git repository, as shown below.

image

huh … ?

Here are a few questions you may be pondering over. The answers in italic are my “2 cents”, until the Version Control (ex Branching and Merging) Guidance adds the long awaited Git for TFVC User guide, with solid guidance.

? Why are we dogfooding separate repositories? It is (we believe) easier to combine Git repos, than to split them. The feature teams above, are working on multiple deliverables, which have few (if any) dependencies. Our decision to dogfood separate repos is intentional to “learn by doing”, not one based on practical guidance yet.
? Where will we store large binary objects, i.e. videos? We were (and still are) dogfooding very large binary objects in a TFS hosted Git repository and found that the performance great. However, be careful! The objects, i.e. videos, become part of the history, which is cloned to every distributed.
? Why Git? Are we moving away from TFVC?   We learn by doing and therefore need to dogfood both the TFVC and Git repositories, as well as respective tooling in Visual Studio. No, we are not moving away from TFVC. We currently have one long-term Team Project, based on TFVC, used for daily operations, one long-term Team Project, based on TFVC, for archives, and two long-term Team project, based on Git, for Project Unicorn. In my opinion a healthy mix Smile PS: We == Visual Studio ALM Rangers  (aka.ms/vsarunderstand)

creating multiple Git repositories

To create the multiple repositories proceed as follows:

  • Using your favourite browser, go to your Visual Studio Online Team Project  (Assets), and select the CODE.
  image

1. Select Assets.

2. Select Manage repositories from the drop down.

  image

3. Select New repository.

  • Using New repository, create your repositories. In our case the whiteboard diagram asks for eight (8) new repos.
  • Our resultant view on the server is as follows:
    image 

convincing Visual Studio Team Explorer that they exists

  • Next we need to connect to our favourite Team Project (Assets) on VSO using the Visual Studio Explorer.
  image 1. Click image Connect to view your Team Projects. 2. Click image Refresh to force an update. In my case the       new repos appeared after he refresh. 3. Note that the repositories are not yet cloned.
  • Clone each repository.
    image
  • Connect to each repository.
    image
  • Preferably add a README.MD Markdown file to the root of each repository.
    • Learn more about Markdown here.
    • See MarkdownPad for a great Markdown editor.
    • Improve your team’s working environment with informative welcome pages:
      image
  • Commit your local changes, i.e. add README.MD file to your repo.
  • Push your changes back to the server.
  • Using one of the quick reference poster from the  Version Control (ex Branching and Merging) Guide we can visualise this (1) clone, (2) add, (3) commit, and (4) push workflow (top right): 
    Version Control Cheat Sheet for TFVC and Git

For more information peruse Use Visual Studio with Git and watch the space for an update to the Version Control (ex Branching and Merging) Guide.

So far so good. Next we will work with our Version Control Guidance, the feature and the product teams to evaluate practical dos, don’ts and recommendations. Watch the space!

Comments

  • Anonymous
    November 30, 2014
    I am trying to setup multiple GIT repos on TFS 2013 Update 4 but I can't figure out how to get this setup. Are there steps documented somewhere?

  • Anonymous
    December 01, 2014
    @Corobo, using the web client you should be able to walk through the steps documented above under "creating multiple Git repositories".

  • Anonymous
    December 05, 2014
    Learn something new each day. This will make git repo and project sprawl under control.

  • Anonymous
    August 11, 2015
    The remote repository URL is like: https://{yourVSOAccountName}.visualstudio.com/DefaultCollection/{yourVSOProjectName}/_git/{Your1stRepositoryName} https://{yourVSOAccountName}.visualstudio.com/DefaultCollection/{yourVSOProjectName}/_git/{Your2ndRepositoryName}

  • Anonymous
    November 12, 2015
    Can this be done in VSO without Git. It seems you cannot create multiple repos under one project.