将Git的所有历史记录迁移到TFS [英] Migrate Git to TFS with all history

查看:237
本文介绍了将Git的所有历史记录迁移到TFS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以将git存储库及其所有历史记录(例如版本,分支和推送消息)迁移到TFS? 现在,源在Github上,我想将其迁移到我的本地TFS存储库中.

Is there any way to migrate a git repository to TFS with all it's history like versions, branches and push messages? Now the source is on Github and I want to migrate that to my local TFS repository.

推荐答案

安装 git-tf (来自Codeplex来源), MS下载,甚至更好:

然后运行以下命令:

  1. 首先,您需要配置GIT存储库

  1. First you need to configure your GIT repository

git tf configure http://yourserver.com:8080/tfs/DefaultCollection $/RepositoryName

  • 检入文件,可以选择保留作者/USERMAP:

  • Check in the files, optionally persisting author/USERMAP:

    git tf checkin --deep --autosquash --keep-author
    

  • 此过程非常缓慢,但是可以正常工作,因此请确保您有足够的时间进行迁移.唯一的缺点是提交时间将是当前签入时间,而不是原始的变更集时间.

    This process is very slow, but it works, so ensure you have plenty of time to spend migrating. The only downside is that commit time will be the current checkin time, not the original changeset time.

    这篇关于将Git的所有历史记录迁移到TFS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆