Visual Studio Code for Mac 作为 Sourcetree 中的差异/合并工具 [英] Visual Studio Code for Mac as diff/merge tool in Sourcetree

查看:48
本文介绍了Visual Studio Code for Mac 作为 Sourcetree 中的差异/合并工具的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以将 Visual Studio Code 设置为 Mac 上 Sourcetree 中的默认差异/合并工具?

Is there a way that I can set Visual Studio Code as the default diff/merge tool in Sourcetree on Mac?

推荐答案

你需要在Sourcetree中做如下配置

You need to do below configuration in Sourcetree

  • 转到 Sourcetree → 首选项差异
  • 外部差异/合并部分中,为可视差异工具合并工具选择自定义
  • Diff 参数 →--diff --wait "$LOCAL" "$REMOTE"

  • Go to Sourcetree → PreferencesDiff
  • In the section External Diff / Merge, select Custom for the Visual Diff Tool and Merge Tool
  • Diff Arguments → --diff --wait "$LOCAL" "$REMOTE"

合并 参数 → -n --wait "$MERGED"

保存配置后,转到源树并右键单击有合并冲突的文件解决冲突启动外部合并工具

After configuration is saved, then goto the Sourcetree and right click on the file with merge conflicts Resolve ConflictsLaunch External Merge Tool

注意:DiffMerge 命令应该指向 /usr/local/bin/code 而不是 code> 否则将无法运行

Note: Diff and Merge command should point to /usr/local/bin/code and not code otherwise it will not work

这篇关于Visual Studio Code for Mac 作为 Sourcetree 中的差异/合并工具的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆