Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

kdiff3 selecting the file from remote completely

Tags:

git

kdiff3

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?

like image 376
vkaul11 Avatar asked Feb 22 '13 18:02

vkaul11


People also ask

How does KDiff3 work?

KDiff3 is a file and directory diff and merge tool which compares and merges two or three text input files or directories, shows the differences line by line and character by character(!), provides an automatic merge-facility, has an editor for comfortable solving of merge-conflicts, provides networktransparency via ...

How do you resolve conflicts in KDiff3?

Choosing Input A, B, or C for All Conflicts If you want to decide every single delta yourself, you can "Set deltas to conflicts". Or if you want to return to the automatic choices of KDiff3 then select "Automatically solve simple conflicts". KDiff3 then restarts the merge.

What is base local remote in KDiff3?

It is the first common ancestor. Often it is useful to have this to help decide which of the newer commits you want. Local is your local commit, the one in the current branch you are standing on. Remote is the remote commit, of the branch you are merging into your local one.


2 Answers

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.

like image 52
lemiorhan Avatar answered Oct 12 '22 23:10

lemiorhan


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.

like image 43
Frank Avatar answered Oct 13 '22 00:10

Frank