Team Foundation Server - Moving Source with History

前端 未结 4 1471
梦毁少年i
梦毁少年i 2020-12-24 10:19

I was wondering what the best approach might be in moving source code, with history, from one Team Project to another Team Project. I am not concerned with work items, repo

4条回答
  •  盖世英雄少女心
    2020-12-24 11:12

    Another option (and I think easier) is to import to Git then export back to TFS using the Git-TF command line tools.

    • Install Git-TF from binary, Choclatey or source code.

    • Clone a TFS folder:

    git tf clone https://myAcc.visualstudio.com/mycollection $/TeamProjectA/Main --deep

    • Disassociate the Git Repo from the TFS server by deleting the .Git/tf folder and the .Git/git-tf file.

    • Configure the new Git Repo to connect to an empty TFS folder.

    git tf configure https://myAcc.visualstudio.com/mycollection $/TeamProjectB/Main --deep

    • Don't forget the --deep

    git tf pull

    You should get a message at this point "git-tf: this is a newly configured repository. There is nothing to fetch from tfs."

    git commit -a -m "merge commit"

    git tf checkin --deep

提交回复
热议问题