Now, when you type “git diff” or “git mergetool” in your’s project directory, p4merge tool will be started. Sometimes it’s faster for me to use command line diff instead of visual one. If you don’t want to use p4merge as diff tool, just comment (using # character) section. Edit ~/.gitconfig file and put following configuration there for merging:Ĭmd = p4merge "$BASE" "$LOCAL" "$REMOTE" "$MERGED" & /usr/local/bin/p4merge "$2" "$PWD/$5"ĭon’t forget to add executable mode/flag to these scripts.Īfter p4merge and scripts are ready it’s time to configure global git settings. Use Git or checkout with SVN using the web URL. The missing comparing text tool for Mac, Windows and Linux.
Use it to manage source code, keep directories in sync, compare program output, etc. If you’re not feeling VS Code as your Diff Tool, you run the command git difftool -tool-help to see more options. Applications/p4merge.app/Contents/MacOS/p4merge $* Beyond Compare is a multi-platform utility that combines directory compare and file compare functions in one package. This adds the following settings to your global Git config: diff tool vscode difftool 'vscode' cmd code -wait -diff LOCAL REMOTE You can paste this in yourself if you prefer. Create these scripts in directory that is in your’s system PATH (i.e. Second step is to create two simple bash scripts: p4merge and p4diff, that will be executed when git needs merge or diff tool. After downloading, open dmg file and copy p4merge tool to Applications folder in your Dock. Go to p4merge tool download page, choose “Browse by platform” tab, pick your platform (in my case it was Macintosh) and download P4V: Visual Client.
Is is very simple to mix together those two things to have the best from both of them and now I will show you how to do that.įirst of all, you have to install p4merge tool. I found p4merge tool much better in case of automatic merging and manual solving the most hard conflicts. Besides of many great features is has pretty good automatic merge tool, that is able to solve conflicts, but not all of them. Git is my favorite SCV system up to now and most probably will be in the future.