Visual Studio TFVC Merge Lines Misaligned

二次信任 提交于 2019-11-28 12:41:11

问题


I am using Visual Studio 2017 with Team Foundation Version Control (TFVC). I am trying to merge changes from a parent branch into a child, but I am getting tons of conflicts that shouldn't exist. The compare function works fine and shows a hand full of difference, but the merge tool is trying to shuffle the 2 sets of code together like a deck of cards. It's so bad, I would feel safer making the change manually.

Is there a way to help the Merge Tool identify the comparable lines of code?


回答1:


You can try the external Compare amd Merge Tools, e.g WinMerge, ExamDiffPro or Beyond Compare.

For example:

Using Beyond Compare as an External Merge Tool:

Go to Tools | Options | Source Control | Visual Studio Team Foundation Server, then click Configure User Tools and then Add. Enter the following:

Extension: *
Operation: Merge
Command: <Path to BCompare.exe>
Arguments: /merge %1 %3 %2 /o:%4 /dn1:%6 /dn2:%8 /dn3:%7 /dno:%9 /nh 

Then it will invoke the external compare and merge tool when you click Merge Changes in Merge Tool to resolve the conflicts. And based on my test it can identify the comparable lines.

For ExamDiff, you can reference : Using ExamDiff Pro as an External Diff Tool



来源:https://stackoverflow.com/questions/47930168/visual-studio-tfvc-merge-lines-misaligned

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!