Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 934
lofidevops Avatar asked Sep 29 '16 09:09

lofidevops


People also ask

How to resolve merge conflicts using TortoiseGit?

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 ...

How do you resolve a merge conflict with meld?

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.

What is diff in TortoiseGit?

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.

How do I use the meld merge tool in git?

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).


1 Answers

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

like image 50
Yue Lin Ho Avatar answered Sep 28 '22 09:09

Yue Lin Ho