TFS分支是否具有子父关系? [英] Does TFS branching have a child parent relation?
问题描述
在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?
我的问题是否清楚?
推荐答案
在构造新分支时,该分支等于您选择的分支分支。
关于TFS合并的棘手点(例如,与P4集成或ClearCase合并相反)是,在任何给定点上,合并A-> B& B-> A不会生成相等数量的合并候选者。
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.
让我们说分支A生成分支B:
Let's say branch A generates branch B:
------->A
\
\
-----> B
假设您在A中进行了更改:
Let's say you make changes in A:
------->A-->A'
\
\
-----> B
如果您尝试合并A'-> B,您将获得所有变更集作为合并候选者/ source文件已从A-> A'更改。
但是,如果您尝试合并B-> 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.
此行为与A是否为父事实无关。
This behavior is regardless of fact that A is 'parent'.
如果您的 A混乱并且无法通过常规合并进行纠正B-> A,您有以下选择:
If your 'A' is messed and cannot be rectifed with regular merge from B-->A, you have the following options:
- Destroy A and generate a fresh copy of B in a new branch C
- Rollback changes from A, until it reaches 'stable'
- Perform a baseless merge from B-->A and force B-state on A
(可能有点偏离主题,但效果很好不过,请务必阅读-对于我对TFS的理解非常有价值:这篇 R.Banks的文章)
(Possible slightly off-topic, but an excellent read nevertheless - and valuable for my grasping of the TFS-way: This article by R.Banks)
这篇关于TFS分支是否具有子父关系?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!