git - Visual Studio 解决方案与 Git 项目和 TFS 项目混合

标签 git visual-studio github tfs visual-studio-2017

我已经在 TFS Server 中启动了包含 3 个项目的 VS2017 解决方案。 几天后,我又从 GitHub 添加了一个项目到我的 VS2017 解决方案和 TFS Server 中。现在 GitHub 存储库中有一些更改,我想将其 merge 到我的项目中。

那么有没有一种方法可以在单个 VS 解决方案上同时使用 Git 和 TFS 来处理与源代码控制不同的不同项目?

最佳答案

你可以Use Git and TFVC repos in the same team project

In Team Foundation Server 2015 Update 1 and above, a project administrator can add a Git repo to a team project created with Team Foundation Version Control (TFVC). You can also add a TFVC repo to a team project created with Git. This allows you to adopt a new version control system while preserving all the data in your team project.

应该有一个与您的远程 github 存储库或 tfs 托管的 git 存储库相对应的本地 git 存储库。您可以通过团队资源管理器--设置-存储库设置在选定的本地 git 存储库中添加远程存储库

enter image description here

与两个远程 git repo 绑定(bind)后,一个用于 GitHub,一个用于 TFS;您可以简单地将 GitHub 中的更改下 pull 到本地 git,然后将更改推送/同步到远程 TFS git 存储库。

关于git - Visual Studio 解决方案与 Git 项目和 TFS 项目混合,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47461689/

相关文章:

eclipse - 在 Visual Studio 中是否等同于 Eclipse "Run Configurations"?

git - 工作目录和本地存储库有什么区别?

github - 使用 Github 目录文件动态填充 Jenkins 作业参数

Gitblit推送错误 "error: RPC failed; result=52, HTTP code = 0"

c# - 未知的 NuGet 错误无法检索信息

git - git ssh config没有与名称关联的地址

visual-studio - 如何在安装程序名称中使用构建变量

github - 使用 GitHub 操作自动向 GitHub 存储库发出拉取请求

git - 在 git 中禁用 -m

git - Hook 还是不 Hook - git