使用所有历史将 Git 迁移到 TFS [英] Migrate Git to TFS with all history
问题描述
有什么方法可以将 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 下载,或者更好:
- 巧克力包:
choco install git-tf
然后运行以下命令:
首先你需要配置你的 GIT 仓库
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屋!