How to get p4merge to come up when I do git mergetool? I did setup p4merge using this in my .gitconfig:
[merge]
    tool = p4mergetool
    stat = true
[mergetool &quot;p4mergetool&quot;]
    cmd = /Applications/p4merge.app/Contents/Resources/launchp4merge &quot;$BASE&quot; &quot;$LOCAL&quot; &quot;$REMOTE&quot; &quot;$MERGED&quot;
    keepBackup = false
    keepTemporaries = false
    trustExitCode = false
    prompt = false
[diff]
    tool = p4mergetool
    renames = copies
    mnemonicprefix = true
[difftool &quot;p4mergetool&quot;]
    cmd = /Applications/p4merge.app/Contents/Resources/launchp4merge &quot;$LOCAL&quot; &quot;$REMOTE&quot;
    keepBackup = false
    keepTemporaries = false
    trustExitCode = false
    prompt = false

When I try to git mergetool in my project it can find the conflicted files and open p4merge tool but it open to choose the files, not with the conflicted file opened. How to solve this?
My versions:
Git 2.23.
Latest p4merge version P4Merge/MACOSX1015X86_64/2020.2/1999419.
macOS Mojave 10.14.6
I just solved it! The definitions of cmd should be
cmd = /Applications/p4merge.app/Contents/MacOS/p4merge &quot;$BASE&quot; &quot;$LOCAL&quot; &quot;$REMOTE&quot; &quot;$MERGED&quot;
...
cmd = /Applications/p4merge.app/Contents/MacOS/p4merge &quot;$LOCAL&quot; &quot;$REMOTE&quot;