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?
In order to resolve the conflict use TortoiseGit → Resolve... and then right click on the conflicted file and choose one of Resolved (the current version of the file which is in the working tree will be used), Resolve conflict using 'mine' (the version of the file of your HEAD will be used), and Resolve conflict using ...
The only change you have to make is to change the path of the Meld installed file for Mac or Linux. After setting up defaults, you can type `git difftool` within the Git local directory to launch the Windows version of Meld, or you can `git mergetool` to resolve merge conflicts as shown below.
Difference between files. If you want to see the differences between two different files, you can do that directly in explorer by selecting both files (using the usual Ctrl-modifier). Then from the explorer context menu select TortoiseGit → Diff.
You may edit your git config file by issuing git config --global -e command. Before making any changes remember to create a backup. Above configuration should work on any Linux, for Windows you must replace meld command by absolute path to Meld: \"C:/Program Files (x86)/Meld/Meld.exe\" ( \" are part of the path).
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
(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
Also see https://gitlab.com/tortoisegit/tortoisegit/issues/2698#note_37137238
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With