Is there a way that I can set Visual Studio Code as the default diff/merge tool in Sourcetree on Mac?
SourceTree config First, open up the options window and go to Diff tab. Change both External Diff Tool and Merge Tool to Custom. In the Diff Command field enter the full path to the vsdiffmerge.exe. For VS 2015 and below you can find it in the Visual Studio installation folder, under Common7\IDE subfolder.
Our Git tooling supports viewing of diffs within VS Code. Tip: You can diff any two files by first right clicking on a file in the Explorer or OPEN EDITORS list and selecting Select for Compare and then right-click on the second file to compare with and select Compare with 'file_name_you_chose'.
SourceTree is configured to use DiffMerge as the External Diff Tool and as the Merge Tool.
You need to do below configuration in Sourcetree
Diff Arguments →
--diff --wait "$LOCAL" "$REMOTE"
Merge Arguments → -n --wait "$MERGED"
After configuration is saved, then goto the Sourcetree and right click on the file with merge conflicts Resolve Conflicts → Launch External Merge Tool
Note: Diff and Merge command should point to
/usr/local/bin/code
and notcode
otherwise it will not work
I found this with instructions on how to get it to work on the Mac. I wasn't able to get it to work until I used the full path to the code executable (I also set code in my global path)
/usr/local/bin/code
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With