19

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?

NotDan
  • 31,709
  • 36
  • 116
  • 156
  • Is either file Read-only? That could cause one of the copy buttons to be disable. – Ben Aug 29 '13 at 14:06
  • I understand this is a very old ‍♀️ question, but just for fun I did [open a discussion topic about this](https://github.com/WinMerge/winmerge/discussions/1070) on WinMerge's Discussion board. – ruffin Dec 06 '21 at 00:20

10 Answers10

4

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

ProKiner
  • 697
  • 7
  • 12
4

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

Andrew
  • 49
  • 1
  • 1
    This is not answer. Put it in comment area – Sachin Dec 17 '13 at 05:45
  • 3
    @Sach how is this not an answer? He not only answered the OP but suggested a possible solution. – reformed Jul 24 '16 at 22:26
  • 2
    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_ ? – blackstrype Dec 16 '20 at 17:00
  • 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 ;-) – pasx Apr 15 '21 at 19:47
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?

Jon Onstott
  • 13,499
  • 16
  • 80
  • 133
2

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

http://diffuse.sourceforge.net/

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.

Ben
  • 704
  • 4
  • 10
  • 25
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.

guest
  • 49
  • 1
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.

tzup
  • 3,566
  • 3
  • 26
  • 34
0

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).

Vinay Sajip
  • 95,872
  • 14
  • 179
  • 191
  • 1
    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... – NotDan Jul 14 '09 at 20:43
  • 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. – Vinay Sajip Jul 14 '09 at 21:04
  • 3
    Right, good luck with the manual thing when you have more than 500 differences to merge – tzup Jan 06 '12 at 09:46
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.

Greg
  • 2,476
  • 4
  • 22
  • 28
  • 9
    Then tortuiseMerge does a pretty good job of mind reading ;) This functionality is also missing in WinMerge :( – Moulde Feb 29 '12 at 13:57
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.

Matt Davis
  • 45,297
  • 16
  • 93
  • 124