P4merge as Git Merge tool

1.2k Views Asked by At

I followed the config steps to get P4Merge set as my Git merge tool in Windows. But, unlike when I used Beyond Compare, P4Merge pops up a window asking for the two files to compare when I have merge conflicts. Beyond Compare automatically opened the app with the file selected, then once a file was merged, would open the next file, until all were complete. Can P4Merge do this? If so how?

I'm using the latest version of Git and P4Merge.

My config is:

[merge]
    tool = p4merge
[mergetool "p4merge"]
    path = C:/Program Files/Perforce/p4merge.exe
[mergetool]
    propt = false
[diff]
    tool = p4merge
[difftool "p4merge"]
    path = C:/Program Files/Perforce/p4merge.exe
[difftool]
    propt = false
1

There are 1 best solutions below

3
Philippe On

Not a real answer but what works for me:

[merge]
    tool = p4merge
    guitool = p4merge
[diff]
    guitool = p4merge
[mergetool "p4merge"]
    cmd = \"C:/Program Files/Perforce/p4merge.exe\" \"$BASE\" \"$LOCAL\" \"$REMOTE\" \"$MERGED\"
    path = C:/Program Files/Perforce/p4merge.exe
[difftool "p4merge"]
    path = C:/Program Files/Perforce/p4merge.exe
    cmd = \"C:/Program Files/Perforce/p4merge.exe\" \"$LOCAL\" \"$REMOTE\"