简体   繁体   中英

Convert TFS Project to Git protocol in TFS 2013

Microsoft Team Foundation Server (TFS) 2013, supports Git protocol. When you create TFS project, you choose should it be as Git or TFS (legacy) for source-control. I have all projects in TFS mode, and I would like to connect my Visual Studio 2013 to existing TFS projects using new - git protocol so I will have additional features. How can I achieve this for existing projects ? (for new ones its clear, just choose option while creating TFS Project)

There is misunderstanding here. TFVC and Git are two different models in TFS: it is not simply the protocol on the wire; the way data is stored and manipulated, both on the client and the server, are different. You may create new projects, but not converting existing one, nor let the two models coexist in the same project in TFS 2013. In case you want to migrate you may use Git-tf to move sources, but you need to move also the other data: work items, builds, tests.

The first question you have to ask yourself is: do I need this? See Which version control system should I use: TFVC or Git? for a start and consider migration costs in the picture.

UPDATE : TFS 2015 Update 1 and later allow coexistence of the two models in the same project (see the Release Notes ). All the other considerations (why and how migrate) still apply.

You can migrate from TFVC to GIT.

You need to:

  • Create a new git repo on TFS
  • Clone down the TFVC repo with git-tfs (this will convert, with history, into a local git repo)
  • Clean up any tfs artifacts
  • Add git ignore etc
  • Set the git remote to the new tfs git powered repo
  • Push up
  • Happiness

There is a write up on the MSDN blog here: http://blogs.msdn.com/b/tfssetup/archive/2015/05/19/migrating-a-tfvc-team-project-to-a-git-team-project-along-with-changeset-history-in-tfs.aspx

Or just look at the tfs-git docs: https://github.com/git-tfs/git-tfs

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM