git - Visual Studio Code for Mac 作为 Sourcetree 中的差异/merge 工具

标签 git macos visual-studio-code atlassian-sourcetree

有没有一种方法可以将 Visual Studio Code 设置为 Mac 上 Sourcetree 中的默认差异/merge 工具?

最佳答案

需要在Sourcetree中做如下配置

  • 转到 Sourcetree → PreferencesDiff
  • 外部差异/merge 部分,为视觉差异工具 merge 工具选择自定义/li>
  • 差异 参数 → --diff --wait "$LOCAL""$REMOTE"

  • Merge 参数 → -n --wait "$MERGED"

  • 保存配置后,转到 Sourcetree 并右键单击有 merge 冲突的文件 Resolve ConflictsLaunch External Merge Tool

    /li>

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

Sourcetree external diff/merge tool configuration Step to resolve conflict in source tree

关于git - Visual Studio Code for Mac 作为 Sourcetree 中的差异/merge 工具,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46770156/

相关文章:

git - 如何在远程服务器上管理 laravel 4

macos - 如何清除 Cocoa 中的 WebView 缓存?

javascript - Mocha的基本功能 'describe/before/it'是如何实现的?

macos - Vagrant 插件和 nokogiri 安装问题

html - 更改 html 骨架的默认设置或格式?

c - VSCode 不构建和调试 pthreads 代码

git - 为什么这个 git clone 命令失败了?

eclipse - Cherry pick 到 Eclipse git 中的另一个分支

git - Composer 版本控制私有(private)存储库

swift - NSButton 子类不发送事件