The World’s Largest Online Community for Developers

'; TFVC to TF GIT migration: repo organisation, incl multiple solutions and build - LavOzs.Com

We are considering migrating from TFVC to GIT (probably hosted within TFS).

Main reason is the bad support for file movement, which makes larger refactorings a pain. Merging generally is rather poor, often asking for manual resolution even if just one side of the merge has been updated. Another bad fact is that we currently have several team projects, and would like to include (via source) some shared functionality, this seems hard to do when several team projects are involved.

What would be a good organisation for the GIT repo for TFS considering

  • we have multiple solutions (right now, spread over different team projects)
  • we plan to have some shared code referenced in several solutions, for debugging in source format
  • right now, we have many legacy feature branches and wanted to keep a main an dev branch for the major solutions (if that workflow is decent with GIT. In TFVC I noticed that the many branches clutter the source control.)
  • build should work via build agent like before, also taking into account the shared project (changes there trigger a build)
  • history should be preserved

We are using for the migration so far, which seems reasonably good. We don't care much for work items or similar.

Please share your insight. After some quick research I am wondering if it would be worth it, since it seems to be some work, amongst others deciding on a repo structure as well as setting up the build projects anew.

The main difference is the centralized aspect of TVFS vs. the decentralized nature of Git, which means:

  • Git repositories tends to be smaller and focused on one component
  • which TVFS can host multiple projects in one giant referential

So make sure to split your Git repo resulting from a git-tfs export, in order to:

  • have one Git repository per solution
  • use submodules to include commons projects into your main Git repos

Depending on your build environment, that can include challenges, but with solutions.

How do I migrate an SVN repository with history to a new Git repository?
Git for beginners: The definitive practical guide
Ignoring directories in Git repositories on Windows
Git workflow and rebase vs merge questions
Removing multiple files from a Git repo that have already been deleted from disk
How do you get git to always pull from a specific branch?
How to change the author and committer name and e-mail of multiple commits in Git?
Stash only one file out of multiple files that have changed with Git?
One big Git repo or multiple smaller ones
Merge changes in a Git repo to TFVC branch