2

I have installed git, p4merge and source tree. I want to use only p4merge for doing diff and merge. Before I opened sourcetree, git difftool used to open p4merge. But now, it just shows the diff on command line. Why is this happening and how do I fix it ?

I set sourcetree to use p4merge from sourcetree UI and that did not work. Removing the sourcetree configs also did not work (I opened new command prompt and tried again).

Here is my global .gitconfig file :

[user]
    name = Jason Taylor
    email = jt@awesome.com
[core]
    autocrlf = true
    editor = 'C:\\notepad-plus\\notepad++.exe' -multiInst -notabbar -nosession -noPlugin
[color]
    ui = true
[gui]
    recentrepo = C:/myrepos/repo1
    recentrepo = C:/myrepos/repo2
[diff]
    tool = p4merge
[difftool "p4merge"]
    path = C:\\Program Files\\Perforce\\p4merge.exe
[difftool]
    prompt = false
[merge]
    tool = p4merge
[mergetool "p4merge"]
    path = C:\\Program Files\\Perforce\\p4merge.exe
[mergetool]
    prompt = false
[credential]
    helper = store

[difftool "sourcetree"]
    cmd = 'C:/Program Files/Perforce/p4merge.exe' \"$LOCAL\" \"$REMOTE\"
[mergetool "sourcetree"]
    cmd = 'C:/Program Files/Perforce/p4merge.exe' \"$BASE\" \"$LOCAL\" \"$REMOTE\" \"$MERGED\"
    trustExitCode = true
Erran Morad
  • 4,563
  • 10
  • 43
  • 72

1 Answers1

1

As an alternative described here:

  • make sure p4merge is in your PATH
  • set difftool to p4merge

If that still fails, do a git config -l --show-origin in the repo where diff does not open p4merge, and check if the setting is overridden, possibly by a local Git cofiguration.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250