Setup p4merge as merge/diff tool

Download and install p4merge

My recommend way doing this is to use chocolatey installing p4merge like this:  choco install p4merge -y

Alternativly you can download and install p4merge by yourself:

Configure p4merge as merge and diff tool

You are able to configure p4merge in two ways: using the console or editing the git config file. (in your user directory -> .gitconfig)

Run the console commands

To add p4merge as visual merge tool, run the following commands in your console. You can also edit your gitconfig file directly.

To setup  p4merge as visual diff tool, run the next commands in your console. ASe before you can add the necessary lines to your local .gitconfig file by yourself.

I also added the functionality to automagically clean up my git working directoy after a conflict. You just have to run this command:

The final config file result

Run p4merge from your git bash