如何在Mac OS上设置kdiff3? [英] How to setup kdiff3 in Mac OS?

查看:434
本文介绍了如何在Mac OS上设置kdiff3?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

.gitconfig 文件中,我如下设置了git diff:

  [diff] 
tool = kdiff3

[difftoolkdiff3]
path = path_directory / kdiff3.app

在此设置中,kdiff无法访问,当我在终端中运行时,出现以下错误

 >> git difftool 
diff工具kdiff3不可用作'Kdiff_local_software_path / kdiff3.app'
fatal:外部差异死亡,停在modified_file

你有什么建议可以解决这个问题吗?在我目前的设置中,我想用kdiff来替换Mac OS 10.10.5 git diff工具 git merge tool

解决方案

kdiff3 通常位于以下位置:

  /Applications/kdiff3.app/Contents/MacOS/kdiff3 

so ,尝试

  [difftoolkdiff3] 
path = /Applications/kdiff3.app/Contents/MacOS/kdiff3

如果您使用<$ c安装了 kdiff $ c> brew ,那么你不需要config中的 difftool 参数来使用git 1.8以上的版本。只需要以下几项:

  [diff] 
工具= kdiff3

如果您安装了 kdiff ,将dmg文件安装到 kdiff.app 然后设置您的本地路径如下:

  [difftoolkdiff3] 
path = directory_path_where_you_installed / kdiff3.app / Contents / MacOS / kdiff3


In.gitconfig file I setup up the git diff as follows:

[diff]
    tool = kdiff3

[difftool "kdiff3"]
    path = path_directory/kdiff3.app

In this setting kdiff is not accessible and I get the following error when I run in terminal

>> git difftool
The diff tool kdiff3 is not available as 'Kdiff_local_software_path/kdiff3.app'
fatal: external diff died, stopping at modified_file

Do you have any suggestion I can fix this issue ? In my current setup Mac OS 10.10.5 git diff tool is git merge tool that I want to replace with kdiff.

解决方案

kdiff3 is generally located at the following location:

/Applications/kdiff3.app/Contents/MacOS/kdiff3

so, try

[difftool "kdiff3"]
    path = /Applications/kdiff3.app/Contents/MacOS/kdiff3

If you installed kdiff using brew, then you'd not need the difftool parameter in config for git 1.8 onwards. Just the following would work:

[diff]
    tool = kdiff3

If you installed kdiff mounting the dmg file to kdiff.app then set your local path as following:

[difftool "kdiff3"]
    path = directory_path_where_you_installed/kdiff3.app/Contents/MacOS/kdiff3

这篇关于如何在Mac OS上设置kdiff3?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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