1
  1. I have meld installed on the ubuntu machine and I've been able to open files using meld.
  2. I followed the answer on Setting up and using Meld as your git difftool and mergetool to setup gifftool to use meld.
  3. the following is my git config:

    diff.tool=meld
    difftool.prompt=false
    difftool.meld.cmd=meld $LOCAL $REMOTE
    
  4. When I try : git difftool I get the differences on the terminal similar to the output of a git diff.

I would really appreciate some help here! Do I need additional scripts? Why does it not work for me?

rlee827
  • 1,853
  • 2
  • 13
  • 32
nogeek001
  • 713
  • 1
  • 7
  • 14

1 Answers1

0

Test 0

Let's test if meld works

Can you run meld in the console?

tymatm@XXX:/mnt/c/git/sandbox$ meld

Test 1

Let's test if setting a tool works.

tymatm@XXX:/mnt/c/git/sandbox$ git config --global diff.tool meld

and then:

tymatm@XXX:/mnt/c/git/sandbox$ git difftool

Viewing (1/2): '1.txt'
Launch 'meld' [Y/n]:

From Configuring diff tool with .gitconfig

Test 1.5

Added since test 1 was failing

Let's try the local, not global, config

tymtam@XYZ:/mnt/c/git/sandbox$ git config diff.tool meld
tymtam@XYZ:/mnt/c/git/sandbox$ git config difftool.prompt true
tymtam@XYZ:/mnt/c/git/sandbox$ cat .git/config
[core]
        repositoryformatversion = 0
        filemode = false
        bare = false
        logallrefupdates = true
[diff]
        tool = meld
[difftool]
        prompt = true
tymtam@XYZ:/mnt/c/git/sandbox$ git difftool

Viewing (1/2): '1.txt'
Launch 'meld' [Y/n]: n

Test 2

Let's tests if the cmd= part works.

vi ~/.gitconfig

Here I'm using a simple echo to verify that the configuration works - in the final setup the command would be cmd = meld XXX

enter image description here

tymtam@XXX:/mnt/c/git/sandbox$ git difftool

Viewing (1/2): '1.txt'
Launch 'meld' [Y/n]: y
/tmp/VuquIm_1.txt 1.txt

Viewing (2/2): '2.txt'
Launch 'meld' [Y/n]: y
/tmp/drAZtV_2.txt 2.txt
tymek@LAPTOP-B0OQU3LB:/mnt/c/git/sandbox$

Test 3

Subsitute echo in ~/.gitconfig with meld

tymtam
  • 31,798
  • 8
  • 86
  • 126
  • Test 0 - works! but Test 1 does not result in a meld prompt. I've deleted all diff related changes from my git config and used only the config mentioned in test 1 and it still doesnt help :( – nogeek001 Jul 24 '18 at 17:11
  • Added test 1.5 with local settings – tymtam Jul 24 '18 at 23:59