Mergetool For Mac


In case you really want to see how Git is calling kdiff3 internally, take a look at the built-in mergetool configuration for kdiff3. Edit: For Beyond Compare 4, which now also supports Mac OS X, simply exchange kdiff3 with bc3 (yes, '3') and adjust the path in the above lines. 2009-03-25: Mac binary available for version 0.9.95 (created by Michael Schmidt) 2009-03-03: Version 0.9.95. Show line end style for each file. Translation update. For the complete list of changes see the ChangeLog and the Release Message and MD5-sums. 2009-01-17: Version 0.9.94 Bugfix release.

Visual Studio Code is a neat editor with many good functionalities but I especially like the way it shows Git merge conflicts. Instead of a 2-way or a 3-way split it just shows one window with both changes, nicely highlighted with colors and actions.


I like this feature so much I decided to set Visual Studio Code as my Git merge tool for both the command line and Git Tower.

Command line

Using Visual Studio Code as a merge tool for Git when using command line means editing your .gitconfig. You just need to define a new tool called code and set it as the default merge tool.


Merge tool for Git Tower

If you use Git Tower as you GUI client for Git, adding Using Visual Studio Code as a merge tool is a bit more tricky, but there is documentation showing you how to do it. You need to create a CompareTools.plist file in ~/Library/Application Support/com.fournova.Tower2/CompareTools/. This file contains definitions for all the custom diff and merge tools you want to use, not just Visual Studio Code.


The definition for Visual Studio Code may look like this

It calls a bash script code.sh when invoked, that runs Visual Studio Code with the same parameters as in the Git merge tool definition in .gitconfig, it is just referenced a differently.

Do not forget to make the bash script runnable by calling chmod +x code.sh.

When you restart Git Tower, you will now see Visual Studio Code among the merge tools options.

Diff Merge Tool For Mac

See also

 g.bluemountainbodywork.co © 2022