Open the .gitconfig file under the directory "c:\Users\[UserName]\.gitconfig",
append the following words:
[mergetool "p4merge"]
cmd = "p4merge.exe" "$BASE" "$LOCAL" "$REMOTE" "$MERGED"
keepTemporaries = false
trustExitCode = false
keepBackup = false