Search code examples
gittfsgit-tfs

How should I migrate those kind of TFS folders to Git


I need to convert from TFS to Git some old project that're hosted on TFS 2010. For the main branch there's no problem since I've used successfully Git-TFS and I've everything (for now) correctly working.

enter image description here My question is about those "folders" that are not automatically taken when retrieving the main

To migrate the main I've done

git-tfs clone http://SITE:8080/tfs/NAME_AAA/ "$/Project/[name of 1]" "C:\xxx\git_migrations\xxx_folder"

But doing so it only takes Main content.

How can I get NTSSRC, Releases,and the others? If I need to separate them since are different git repo, how should I call them in Azure Devops Repository? Something as Project1_NTSSRC and so on?


Solution

  • Due to the discrepancy between how TFVC and Git are working, that's the typical use case where it is difficult to migrate form TFVC to Git.

    It seems that you only have one main branch to migrate. In this case, maybe you'd better doing a "flat" migration (without branch support) to migrate the whole parent folder "disabling" the branch support of git-tfs with argument --branches=none.

    That way you could migrate history of a TFVC folder. Git-tfs try to manage it as a branch.

    See https://github.com/git-tfs/git-tfs/blob/master/doc/usecases/migrate_tfs_to_git.md#fetch-all-the-history-for-just-the-main-branch-ignoring-all-the-other-branches