Import GIT Repository to TFS on Visual Studio Online

时间:2017-03-22 18:43:43

标签: git visual-studio-2015 tfs azure-devops gitblit

I'm trying import a what was a Mercurial Repository that has been imported to a GIT repository. I started this project almost a year ago that prompted the following thread: Importing Mercurial... but it got shelved I'm trying to pick back up and am where I'm trying to Import from Gitblit to TFS.

I've created a folder and cloned the TFS folder using git-tfs and then ran the "git add remote origin http://..." pointing to the local git-blt server.

When I run the "git pull origin master" command I get "fatal: Couldn't find remote ref master" I've tried "master", "default", "head" all with a similar result.

This is a very simple repository that does not have any "branches" in it. It was simply used for version control and historical reference. Is there some step I need to do to "create" a branch or something?

1 个答案:

答案 0 :(得分:0)

请参阅以下步骤,使用VS 2015来达到您的要求:

  1. 打开VS 2015>团队资源管理器
  2. 点击管理连接图标>管理连接>连接到团队项目
  3. 选择或添加Team foundation服务器(您的VSTS)并选择相应的团队项目> Connect
  4. 选择该团队项目的存储库>连接
  5. 单击克隆存储库链接(您必须克隆存储库以打开此项目的解决方案)以克隆存储库
  6. 点击设置>存储库设置
  7. 点击添加
  8. 输入名称(例如MyTFS)和获取网址(TFS的存储库网址)>保存
  9. 转到主页视图>点击同步
  10. 点击推送
  11. 选择一个遥控器(步骤8,MyTFS),然后单击“推送”