开发者

How to recover after a merge failure in TFS 2008?

We recentl开发者_运维百科y attempted a large, "cherry picked" merge. First we did a full merge from one child development branch into the parent Main branch, then did a full merge of the Main branch into another child development branch, then we attempted to do a cherry pick merge from the second Development branch back into merge. There were many checkins, including renames and deletes; and when it wasn't working we did a bunch of TFPT rollbacks.

What options do we have to recover here? Things like baseless, force, etc merge? Roll back to a point in time and somehow, try again?


I assume the goal is to make Main look like Dev2? This should get you there, or very close:

tf merge $/project/Dev2 $/project/Main -r -force -version:1~T
tf resolve -auto:accepttheirs

Use 'tf folderdiff' to clean up any lingering diffs.

The other main option in general is to delete & recreate the target branch, but that really only works when the target is a leaf in your branch tree. Deleting Main in your case would disrupt its relationship with Dev1 and the rest of the tree. Also, I'd recommend folks going down this path either Destroy the errant branch (vs simply Delete), or pick a new name for the re-branched copy, in order to avoid rare but nightmarish bugs in some versions of TFS 2005/2008. (2010 shouldn't have those problems)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜