Git到TFS源代码管理迁移 [英] Git to TFS Source Control Migration

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

问题描述

我想看看TFS如何为我的命令工作。所以我想将我们当前的GIT存储库移至TFS数据库。我们已经使用了GIT,因为它支持分支支持,所以我想用TFS 2010来解决这个问题。



现在问题是。我如何将我们的GIT仓库出口到TFS。显然它是某种脚本。有没有人做到这一点?任何建议?



谢谢。

解决方案

他们自己的GIT< - > GFS的TFS扩展: GIT-TF



这允许从TFS拉取新的GIT存储库或配置为允许GIT到TFS推送,这就是你想要做的:

(来自文档)


对于使用现有Git仓库的团队,共享
的开发人员使用Git-TF更改为TFS将使用以下工作流程。




 #配置现有的回购与TFS的关系
git tf configure http:// myserver:8080 / tfs $ / TeamProjectA / Main

#从TFS获取最新更改并将这些
#更改与本地更改合并。
#请注意,合并在团队配置中非常重要。
#请参阅下面的重新合并与合并。
git tf pull

git commit -a -m合并提交

#将合并提交作为单个TFS变更集签入
git tf checkin

#将合并提交推送到原始
git push



<此外,可以使用先前存在的开源 GIT-TFS 解决方案(仅限于Windows,Microsoft解决方案使用Java并且是跨平台的),在 Git to TFS 2008单向迁移(包含历史记录)的答案中进行了描述

I'd like to see how TFS will work for my command. So I'd like to move our current GIT repository to TFS database. We've used GIT for it's prevailed branching support so I'd like to use TFS 2010 to address that issue.

Now question is. How do I export our GIT repo to TFS. Obviously it's some kind of script. Does have anyone done that? Any suggestions?

Thank you.

解决方案

Microsoft have now released their own GIT <--> TFS extension for GIT: GIT-TF

This allows pulling a new GIT repository from TFS or configuring to allow GIT to TFS pushes, which is what you want to do:

(from the documentation)

For a team working with an existing Git repo, a developer sharing changes to TFS using Git-TF would use the following workflow.

# Configure the existing repo's relationship with TFS
git tf configure http://myserver:8080/tfs $/TeamProjectA/Main

# Fetch the latest changes from TFS and merge those 
# changes with the local changes.
# Note, merging is important when working in a team configuration. 
# See "Rebase vs. Merge" below.
git tf pull

git commit -a -m "merge commit"

# Check in the merge commit as a single TFS changeset
git tf checkin

# Push the merge commit to the origin
git push

In addition, the preexisting open-source GIT-TFS solution can be used (from Windows only, Microsoft's solution uses Java and is cross-platform), described in an answer to Git to TFS 2008 one way migration (with history)

这篇关于Git到TFS源代码管理迁移的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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