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)
-
7TFS version control called TFVC, it's not legacy actually, it has the same rights as Git. – Alexan Jun 30 '14 at 13:05
-
so you need to convert TFVC to Git. Maybe just clone existing project? Look here: http://stackoverflow.com/questions/2874873/migrating-from-tfs-to-git – Alexan Jun 30 '14 at 13:16
2 Answers
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.

- 8,248
- 2
- 33
- 41
-
I would expect that allowing teams to convert existing projects from TFVC -> Git is something that Microsoft plans to enable eventually. But it is not currently possible. – Dylan Smith Jul 01 '14 at 04:44
-
I noticed that they always point to Git-tf to manage migrations, kind of endorsement. I am aware that it has limitations: a team of mine is trying to Git-tfs for the branch management feature, but it seems to break with our large codebase. – Giulio Vian Jul 01 '14 at 06:52
-
Thank you for great comments, however as I see it, Git almost does not have disadvantages over TFVC. The current problem that I see is that VS does not have native Git support and it uses open-source/free 3rd party git for windows, and VS interface just relays commands, and it works very bad, so Git is still not integrated with VS interface (branches etc.) good enough, my opinion. – Hrvoje Kusulja Jul 25 '14 at 20:43
-
That's not correct. VS 2013 has built-in Git support via libgit2, which is a library; for VS2012 you simply install "Visual Studio Tools for Git" which is based on the same technology. It is true that the IDE do not offer all Git commands and you can use other tools; see http://www.woodwardweb.com/git/setting_up_the.html for some ideas. – Giulio Vian Jul 26 '14 at 07:05
-
Can you keep the same project name? I don't believe it's possible. Can anyone confirm this? – Prabu Aug 17 '16 at 14:53
-
It depends on the TFS version: I updated answer with additional info. – Giulio Vian Aug 17 '16 at 19:40
-
The link that you provided regarding "which version control system should I use: TFVC or Git" is actually talking about "Git and VSTS" and not "Git and TFVC" – Red M Jan 10 '18 at 19:01
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

- 28,450
- 9
- 65
- 75

- 1,218
- 13
- 30
-
-
@PrabuWeerasinghe I would use a new name, or the same name and a new server (what we did, as we were migrating to a new version). That way if some thing goes wrong you can always backtrack. If every thing works out fine you could remove the old and rename the new. – DarcyThomas Aug 17 '16 at 21:29