TFS分支有子父关系吗?
在 tfs 中进行分支时,是从 A 分支到 B 还是从 B 分支到 A 有关系吗?问题是我们有分支 A 和分支 B,现在分支 A 已经搞砸了,我们想通过从 B 分支一个新分支来从分支 B 重新创建它。据我所知,当你做一个分支时,你会得到分支之间的关系,但你没有得到“父子”关系,对吗?
我的问题清楚吗?
When doing branches in tfs, does it matter if you are branching A to B or from B to A? The thing is that we have branch A and branch B, and now branch A has got messed up and we would like to recreate it from branch B by branching a new branch from B. As far as I know when you do a branch you get a relationship between the branches, but you don't get a "parent-child" relation, is that correct?
Is my question clear?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在构建新分支时,它等于您选择从中分支的分支。
TFS 合并的棘手点(与 P4 集成或 ClearCase 合并相反)是在任何给定点合并 A-->B & B-->A不会生成等量的合并候选。
假设分支 A 生成分支 B:
假设您在 A 中进行了更改:
如果您尝试合并 A' --> B 您将获得从 A-->A' 更改的所有变更集/源文件作为合并候选者。
但如果你尝试合并 B --> A' 你根本不会得到任何合并候选者。
这种行为与 A 是“父母”这一事实无关。
如果你的“A”被搞乱了并且无法通过 B-->A 的常规合并来纠正,你有以下选择:
从 B-->A 并在 A 上强制 B 状态
(可能有点偏离主题,但仍然是一本很好的读物 - 对我掌握 TFS 方式很有价值:这篇文章由 R.Banks 撰写)
At the point where a new branch is constructed, it gets equal to what you chosen to branch out from.
The tricky point about TFS-merging (as opposed, for example to the P4 intergration, or ClearCase merges) is that at any given point merging A-->B & B-->A will not generate the equal amount of merge candidates.
Let's say branch A generates branch B:
Let's say you make changes in A:
If you try to merge A' --> B you will get as merge candidates all your changesets/source files that were changed from A-->A'.
But if you try to merge B --> A' you will get no merge candidates at all.
This behavior is regardless of fact that A is 'parent'.
If your 'A' is messed and cannot be rectifed with regular merge from B-->A, you have the following options:
from B-->A and force B-state on A
(Possible slightly off-topic, but an excellent read nevertheless - and valuable for my grasping of the TFS-way: This article by R.Banks)