Visual Studio Code for Mac as diff/merge tool in SourceTree

寵の児 提交于 2019-12-22 08:09:08

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!