Open git-bash and type
git config --global merge.tool p4merge
git config --global mergetool.p4merge.cmd "p4merge \"$BASE\" \"$LOCAL\" \"$REMOTE\" \"$MERGED\""
git config --global mergetool.p4merge.trustExitCode false
git config --global mergetool.keepBackup false
git config --global diff.tool p4merge
git config --global difftool.p4merge.cmd "p4merge \"$LOCAL\" \"$REMOTE\""The .gitconfig should look like this