简体   繁体   English

在Visual Studio Online上将GIT存储库导入TFS

[英]Import GIT Repository to TFS on Visual Studio Online

I'm trying import a what was a Mercurial Repository that has been imported to a GIT repository. 我正在尝试导入什么是已经导入到GIT存储库的Mercurial存储库。 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. 我在大约一年前开始了这个项目,并提示了以下线程:Import Mercurial ...,但被搁置了,我试图重新安装,并且在这里尝试从Gitblit导入到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. 我创建了一个文件夹,并使用git-tfs克隆了TFS文件夹,然后运行“ git add remote origin http:// ...”,指向本地git-blt服务器。

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. 当我运行“ git pull origin master”命令时,我得到“致命的:找不到远程引用主机”,我已经尝试过“ master”,“ default”,“ head”,结果都差不多。

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? 我需要执行一些步骤来“创建”分支或其他内容吗?

Refer to these steps blow to use VS 2015 to achieve your requirement: 请参考以下步骤以使用VS 2015来满足您的要求:

  1. Open VS 2015 > Team Explorer 打开VS 2015>团队资源管理器
  2. Click Manage Connections Icon > Manage Connections> Connect to team project 单击管理连接图标>管理连接>连接到团队项目
  3. Select or add Team foundation server (your VSTS) and select the corresponding team project >Connect 选择或添加Team Foundation服务器(您的VSTS),然后选择相应的Team Project> Connect
  4. Select a repository of that team project > Connect 选择该团队项目的存储库>连接
  5. Click clone the repository link (You must clone the repository to open solutions for this project) to clone repository 单击克隆存储库链接(您必须克隆存储库才能打开此项目的解决方案)以克隆存储库
  6. Click Settings >Repository Settings 单击设置>存储库设置
  7. Click Add 点击添加
  8. Type name (eg MyTFS) and Fetch URL (the repository URL of your TFS) >Save 键入名称(例如MyTFS)和获取URL(TFS的存储库URL)>保存
  9. Go to Home view > click Sync 转到主视图>单击同步
  10. Click Push 点击推送
  11. Select a remote (step 8, MyTFS) and click Push 选择一个远程服务器(步骤8,MyTFS),然后单击“推送”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM