TFS:频繁合并到开发分支

发布于 2024-07-19 00:46:36 字数 497 浏览 7 评论 0原文

我还没有找到关于这个问题的任何好的解释,所以我希望有人能解释一下。 我的想法是“就是这样”,但无论如何我想更好地理解一点。

这是我的情况:我有一个主分支和一个开发分支(dev)。 大多数开发人员都在 Main 中工作,但对于我的特定项目,我在 Dev 中工作。 我希望 Dev 中的代码与 Main 保持同步,因此我经常合并到 Dev 中。

第一次合并 Main->Dev 时,它复制文件 F1,该文件在 Main 中更改,但在 Dev 中未更改。 这很棒。 下次我合并 Main->Dev 时,F1 在 Main 中再次更改,因此应该复制它(在 Dev 中未更改)。

然而,TFS 告诉我目标和源都发生了更改,即使目标中的更改与 Main 中的更改完全相同。 当很多文件发生这种情况时,仅检查并自动合并这些文件非常麻烦。

有谁知道为什么 TFS 在这种情况下没有做得更好。 有谁知道如何在我的情况下使合并更容易?

谢谢。

I haven't found any good explanation of this problem, so I'm hoping someone can shed some light on it. My thought is that this is "just the way it is", but I would like to understand a little better anyways.

Here is my situation: I have a main branch, and a development branch(dev). Most developers are working in Main, but for my specific project I am working in Dev. I want to keep the code in Dev as much in sync with Main, so I do frequent merges into Dev.

The first time I merge Main->Dev, it copies file F1 which was changed in Main but not in Dev. This is great. The next time I merge Main->Dev, F1 has changed in Main again, so it should copy it (was not changed in Dev).

However, TFS tells me that both target and source have changes, even though the changes in target are exactly the same changes from Main. When this happens to a lot of files it is very cumbersome to go through and auto merge only these files.

Does anyone know why TFS does not do a better job with this situation. Does anyone know how to make merging easier in my situation?

thank you.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

抱猫软卧 2024-07-26 00:46:36

这绝对是“不是这样的”。 我从未见过这种情况像你描述的那样发生。 看来您的环境或工作方式一定有问题。

这并不能回答你的问题,但我会质疑为什么“大多数”开发人员都在 Main 中工作。 主要应该是为了稳定,因此很少有人会直接在其中工作; 只有那些进行中断/修复的人。 新的编码总是在 Dev 中完成并合并到 Main 中。

也许您可以布局您的项目结构,这可能会给出更多提示可能是什么问题。

This definitely is "Not the way it is". I have never seen this happen the way you describe. Seems there must be something amiss in your environment or the way you are working.

This does not answer you question, but I would question why "most" developers are working in Main. Main should be for stabilization and as such very few people would work directly in it; only those doing break/fixes. New coding is always done in Dev and merged to Main.

Maybe you could layout your project structure and that might give some more hints what the problem might be.

不回头走下去 2024-07-26 00:46:36

经过一些测试和几次合并后,我得出的结论是“事实并非如此”。 我无法可靠地重现我最初观察到的行为。 在随后的合并过程中,我没有遇到同样的困难,但仍然存在一些我无法完全解释的奇怪行为(不知道为什么当某些文件中没有冲突时我必须手动解决冲突)。

所以我不能说 TFS 合并有任何缺陷,但它有一些奇怪的地方。

谢谢。

After some testing and a few more merges, I concluded that this is "not the way it is". I could not reliably reproduce the behavior I originally observed. During subsequent merges, I did not run into the same difficulty but there was still some odd behavior I can't totally explain (not sure why I had to manually resolve conflicts when there were none in some files).

So I can't say TFS merge is deficient in any way, but there is something odd about it.

thanks.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文