问题
Is there a way that I can set on Mac the Visual Studio Code as the default diff/merge tool in SourceTree? Thank you in advance.
回答1:
According to the docs I found, SourceTree just uses whatever you've configured your git repo to use.
You can configure your git repo to use VS Code with the git config
command like so:
git config --global core.editor "code --wait"
However, you must configure VS Code to launch from the terminal before this will work.
See this blog for more info.
回答2:
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
来源:https://stackoverflow.com/questions/46770156/visual-studio-code-for-mac-as-diff-merge-tool-in-sourcetree