19

How can I choose the complete selection in kdiff3 as C (file from remote in kdiff3) instead of changing everything line by line (merge conflicts)? I just want to choose the remote file. Also what is selection A (base file), the remote file checked out locally before new changes?

vkaul11
  • 4,098
  • 12
  • 47
  • 79

2 Answers2

20

Open "Merge" menu item. It has "Choose C Everywhere" option, which selects the edits in remote (C) for all lines. If you just what to use the edits on remote for unresolved conflicts, then you should select "Choose C for All Unresolved Conficts".

enter image description here

Git does 3-way merge. A shows the file from the parent commit of B and C commits. B is the file from the branch you are in, and C is the file from the branch you are merging from.

lemiorhan
  • 1,434
  • 11
  • 18
  • Instead of using kdiff I would rather select conflict (in merge/conflicts window of git extensions) and use context menu items "Choose ..." (better for binary files for ex.) – SalientBrain Dec 06 '16 at 14:10
  • 3
    Why don't I see these options on Linux? (I'm on KDiff3 v1.8.1). – Roy Tinker Jun 16 '20 at 21:03
  • 2
    There is no such option any more – Wang Jun 19 '20 at 21:54
  • Yep there used to be (on Ubuntu Bionic at least), but cannot find on apt kdiff3 for Focal – Patrizio Bertoni Jan 12 '21 at 09:46
  • 9
    These options are not available in KDiff3 v1.8.1, however the shortcuts are still working. Ctrl+Shift+1 is Choose A Everywhere; Ctrl+Shift+2 is Choose B Everywhere. – Frank Feb 03 '21 at 22:05
  • @Frank, thanks, this helps a lot! Can you add it as a separate answer as it is hard to notice otherwise? – mrts Nov 30 '21 at 18:22
  • 3
    Ubuntu 20.04 ver 1.8.1 : shortcuts are broken in my installation: - according to Settings > Configure keyboard shortcuts it seems that shortcuts are as in the previous version Ctrl+ to choose current diff, Shift+Ctrl+ to Choose everywhere - working, however, is only Shift+Ctrl+ but to choose the current diff Unfortunately, I found no discussion place for Kdiff3: - http://kdiff3.sourceforge.net/ - is dead - https://github.com/KDE/kdiff3 - issues unavailable, but seems maintained – Jan Brezina May 13 '22 at 12:31
  • 1
    Just installed 1.9.2 from sources. Seems fixed, with good old merge menu. – Jan Brezina May 13 '22 at 13:10
5

Supplement to @lemiorhan 's answer:

These options are not available in KDiff3 v1.8.1, however, the shortcuts are still working. Ctrl+Shift+1 is Choose A Everywhere; Ctrl+Shift+2 is Choose B Everywhere.

Frank
  • 333
  • 3
  • 6