Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git difftool - KDiff3 can't edit a file

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?

like image 662
B Dev Avatar asked Apr 07 '17 14:04

B Dev


People also ask

How to edit in kdiff?

Much navigation will be done with the scroll bars and the mouse but you can also navigate with the keys. If you click into either window then you can use the cursor buttons left, right, up, down, page up, page down, home, end, ctrl-home, ctrl-end as you would in other programs.

How do I configure kdiff3?

Add the kdiff3 installation directory to the Windows Path. Add TMP to the WSLENV Windows environment variable (WSLENV=TMP/up). The TMP dir will be used by git for temporary files, like previous revisions of files, so the path must be on the windows filesystem for this to work. Set TMPDIR to TMP in .


1 Answers

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.

like image 110
Rookie Avatar answered Oct 18 '22 12:10

Rookie