How can I get WinMerge to keep left and right?
Asked Answered
S

10

20

Using the TFS merge tool, I can click on the left side and the right side to keep both changes/conflicts. This is needed when I add a method and another team member adds a method in the same place and I need to keep them both. In WinMerge (file merge, not folder), it seems that I can only overwrite the right with the left. Is it possible to make WinMerge copy the left to the right, and keep the right?

Spiritualist answered 14/7, 2009 at 17:11 Comment(2)
Is either file Read-only? That could cause one of the copy buttons to be disable. – Hyper
I understand this is a very old πŸ§Ÿβ€β™€οΈ question, but just for fun I did open a discussion topic about this on WinMerge's Discussion board. 🀞 – Heigho
G
5

Check out KDiff3... best free three-way merge tool out there.

Gona answered 14/7, 2009 at 21:25 Comment(0)
I
5

No, but you can type on the right side and also copy and paste from the left side to the right side.

Inhale answered 17/12, 2013 at 5:27 Comment(4)
This is not answer. Put it in comment area – Smatter
@Sach how is this not an answer? He not only answered the OP but suggested a possible solution. – Fairfield
Agreed with @reformed. Judging by the other answers (which offer alternatives to WinMerge, this is the most viable answer to the question: how to keep left and write in WinMerge ? – Andante
Drag and drop from left to write is available but please WinMerge devs if you read this post add the feature to keep both left and right with a shortcut ;-) – Carrick
V
2

I think you're looking for Merge capability. I've seen it in TortoiseMerge but not in WinMerge (though there may be some way to do it). Can you simply copy-and-paste manually from one side to the other?

Villareal answered 14/7, 2009 at 20:52 Comment(0)
S
2

Diffuse does a marvelous job of that. Don't know what Greg is talking about.

http://diffuse.sourceforge.net/

Shannonshanny answered 14/10, 2012 at 1:51 Comment(0)
P
1

I had the same problem and found that Guiffy cand merge changes from both file A and file B.

There's a button where you can apply this kind of merging to all the differences.

Check this help page to find out how to keep both changes.

Although not free, you can use it for free for 21 days. More than enough for my one time need.

Pope answered 6/1, 2012 at 12:8 Comment(0)
H
1

I had this problem, but I found out that one of the files (the one of the left) was Read-only. This meant I couldn't copy anything from right to left.

From the File menu, there are options to disable or enable Read-only attribute of either file. Have them both unchecked will allow you to copy in either direction.

Hyper answered 29/8, 2013 at 14:9 Comment(0)
S
1

What Andrew said is actually quite helpful. I can't imagine that the desired functionality not be in WinMerge, but if not, copy left and right all that you can normally, then manually copy/paste the rest to get both sides identical how you want them. You can refresh after making these manual changes to see the status.

Sixfold answered 27/3, 2015 at 0:15 Comment(1)
Looks like the right answer to me, using if using WinMerge as per OP. – Pozsony
G
0

The simple answer is no - you're almost asking it to read your mind. Instead, WinMerge opens both files up in a full text editor, and it illustrates the discrepancies while you do the copy and pasting.

Grillparzer answered 19/4, 2010 at 13:47 Comment(1)
Then tortuiseMerge does a pretty good job of mind reading ;) This functionality is also missing in WinMerge :( – Stomachic
E
0

Late to the party, but I just ran into this problem.

I'm using WinMerge 2.16.18.0. On the Select Files or Folders panel, there is a checkbox under each file/folder section that allows that file/folder to be treated as read-only. I unknowingly had that checkbox set as it is easy to miss.

Evite answered 4/7, 2022 at 0:18 Comment(0)
W
-1

Yes, you need to go into the file comparison window (by double-clicking on an entry in the folder comparison window) which will show groups of differences (lines in the files). In this window, you can move stuff between left and right any way you want, using the toolbar buttons or keys (Alt-Left, Alt-Right, Alt-Up, Alt-Down).

Wooded answered 14/7, 2009 at 17:15 Comment(3)
This is what I was doing, but the problem is that when you move Left to Right, the Left will OVERWRITE the Right... and I don't want to have to do that, I want to add the Left to the Right, and keep the Right also... – Spiritualist
Obviously the merge tool is not as good as a human. If it's not doing what you expect, manually copy & paste the lines to how you want them. – Wooded
Right, good luck with the manual thing when you have more than 500 differences to merge – Pope

© 2022 - 2024 β€” McMap. All rights reserved.