lofidevops
lofidevops

Reputation: 16962

How do I configure TortoiseGit to use Meld for diff, merge and conflicts?

I have tried a naive configuration to replace the native TortoiseGit viewers with Meld for Windows for diff, merge and conflict actions. What additional parameters do I need to pass in to Meld for these functions?

Simplest configuration: path to Meld.exe

Upvotes: 9

Views: 4355

Answers (2)

Yue Lin Ho
Yue Lin Ho

Reputation: 3111

Tested under meld 3.16.2

Diff:

C:\Program Files (x86)\Meld\Meld.exe %base %mine

Merge:

C:\Program Files (x86)\Meld\Meld.exe %mine %base %theirs --output %merged

enter image description here

(meld shows the %base file content in middle pane at the beginning. And meld saves the content of middle pane to %merged file after modifying and saving the content of middle pane.)

or

C:\Program Files (x86)\Meld\Meld.exe %mine %merged %theirs

enter image description here

Also see https://gitlab.com/tortoisegit/tortoisegit/issues/2698#note_37137238

Upvotes: 10

Julian
Julian

Reputation: 36710

Something like this:

meld.exe --diff %base %mine 

%base The original file without your changes

%bname The window title for the base file

%mine Your own file, with your changes

%yname The window title for your file

%bpath Full path to the original file

%ypath Full path to your file

%brev The revision of the original file, if available

%yrev The revision of the second file, if available

See https://tortoisegit.org/docs/tortoisegit/tgit-dug-settings.html

Upvotes: 1

Related Questions