Git difftool - KDiff3 can't edit a file
Asked Answered
E

2

10

I have the following difftool configuration for KDiff3 in file .gitconfig,

[difftool "kdiff3"]
    external = '"C:/Program Files/KDiff3/kdiff3.exe" "$LOCAL" "$REMOTE" --output "$MERGED"'
    trustExitCode = false
[difftool]
    prompt = false
[diff]

And I am using the following command to see the diff file,

git difftool config/application.config.php -t kdiff3

But when kdiff3 opens, I am unable to edit the file. How can I edit a file in kdiff3 in difftool?

Elwaine answered 7/4, 2017 at 14:40 Comment(2)
kdiff3 is so much better than meld and kompare, kdiff3 shows exact per word changes! now I just need to be able to edit the things I pasted from clipboard tooNewsstand
If you can't edit file then it's useless.Knutson
S
2

When the KDiff3 window opens up, go to menu MergeMerge Current File.

An output window will be opened where you can resolve the conflicts by selecting, lines from either of your files.

Snippet answered 27/2, 2018 at 6:43 Comment(0)
L
-3

If you are in the diff view of KDiff3, right click→Full edit will enable you to edit the file; if you are in the merge view, only the merge result at the bottom can be edited. In the three original file content windows, you can see "Editing disabled" in their status bar.

KDiff3 / Feature Requests / #9 Manual editing

Leukoderma answered 31/1, 2019 at 3:27 Comment(3)
if I right click nothing happens, what I am doing wrong? I ran it, and cancelled opening files, so I got 2 empty places to paste things from clipboard, after I paste them, I cant edit them! the best comparison app (much better than meld or kompare, as kdiff3 compares by word!)Newsstand
I think Aquarius Power is correct that there isn't any context menu and thus no "Full edit" (I tested it on KDiff3 version 1.8.1 on Ubuntu MATE 20.04 (Focal Fossa)). Can you fix your answer? (But without "Edit:", "Update:", or similar - the answer should appear as if it was written today.)Gerthagerti
I remember that when I posted the answer, it should be the Windows kdiff3, but now I do not have one PC by hand, could anyone test the Windows version?Leukoderma

© 2022 - 2024 — McMap. All rights reserved.