将Github代码集成到TFS - 自动签入 [英] Integrating Github code to TFS - auto check-in

查看:525
本文介绍了将Github代码集成到TFS - 自动签入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在使用Github的一个项目。我们需要在我们的TFS中签入这个项目的代码。



我们需要自动化这个过程。否则,我们每天都需要下载代码,然后办理登机手续。



是否有一些插件或一些工具可以自动执行此操作?

Git-TF 来帮助自动执行这些工作。



如果您在TFS中使用Git存储库,那么您可以在本地Git仓库中创建两个远程控制台,即

  git remote add upstream https://github.com/ foo / bar.git 
git remote add origin https:// tfsserver / DefaultCollection / _git / bar

然后简单地做一个git pull上游主人,然后是一个git push origin master,假设master是你想保持同步的分支。



版本控制系统,你可能想要在你的TFS版本库中保留一个版本控制分支h上游GitHub项目中的内容是什么,以便您可以轻松看到变化进入到一个地方,然后在本地存储库中处理合并。


We are using one of the project from Github. We need to check-in code of this project in our TFS.

We need to automate this process. Else everyday we need to download the code and then check-in.

Is there some plugin or some tool to automate this?

解决方案

If you are using a TFVC repository in TFS then you'll probably want to build some scripts and a process around Git-TF to help automate some of this work.

If you are using a Git repository in TFS then you can create set up two remotes in a local Git repository, i.e

git remote add upstream https://github.com/foo/bar.git
git remote add origin https://tfsserver/DefaultCollection/_git/bar

And then simply do a git pull upstream master followed by a git push origin master assuming that master is the branch that you want to keep in sync.

With either version control system, you probably want to keep a branch in version control in your TFS repository to match what is in your upstream GitHub project so that you can easily see change coming in the one place and then handle your merges inside your local repository.

这篇关于将Github代码集成到TFS - 自动签入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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