如何在 git 扩展上配置 KDiff3?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/46743154/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 12:56:44  来源:igfitidea点击:

How can I configure KDiff3 on git extension?

gitgit-extensionskdiff3

提问by Success Man

When I open my Git extensions, the result is like this:

当我打开我的 Git 扩展时,结果是这样的:

Enter image description here

在此处输入图片说明

I try to repair it. I click the repair button. But that's not action.

我尝试修复它。我点击修复按钮。但这不是行动。

I get some reference: Git: How configure KDiff3 as merge tool and diff tool.

我得到了一些参考:Git: How configure KDiff3 as merge tool and diff tool

I try it like this:

我像这样尝试:

Enter image description here

在此处输入图片说明

But it does not work.

但它不起作用。

How can I solve this problem?

我怎么解决这个问题?

Environment

环境

  • OS: Windows 10 Pro 64-bit
  • Git 2.49
  • 操作系统:Windows 10 Pro 64 位
  • git 2.49

回答by Anuj

Check if KDiff3 is installed and in which folder (to verify the path).

检查是否安装了 KDiff3 以及在哪个文件夹中(以验证路径)。

I was also getting the same problem and had run the mentioned Git commands, but it didn't help. Later I realized that my KDiff3 is installed under "Program Files (x86)" folder, not "Program Files".

我也遇到了同样的问题并运行了提到的 Git 命令,但它没有帮助。后来我意识到我的 KDiff3 安装在“Program Files (x86)”文件夹下,而不是“Program Files”。

I have changed the folder name in Git commands, for example:

我在 Git 命令中更改了文件夹名称,例如:

Instead of

代替

git config --global --add mergetool.kdiff3.path "C:/Program Files/KDiff3/kdiff3.exe"

I used the below and executed it again:

我使用了以下内容并再次执行:

git config --global --add mergetool.kdiff3.path "C:/Program Files (x86)/KDiff3/kdiff3.exe"

And it solved the problem.

它解决了这个问题。

回答by RussKie

I'm guessing you have downloaded the lite version of the installer which doesn't include KDiff.

我猜您已经下载了不包含 KDiff 的安装程序的精简版。

Please download and install the complete installer from https://github.com/gitextensions/gitextensions/releases/latest

请从https://github.com/gitextensions/gitextensions/releases/latest下载并安装完整的安装程序

You can also just download and install KDiff yourself. We bundle and ship the version 0.9.97, which you can download from here: https://sourceforge.net/projects/kdiff3/files/kdiff3/0.9.97/

您也可以自己下载并安装 KDiff。我们捆绑并发布了 0.9.97 版本,您可以从这里下载:https://sourceforge.net/projects/kdiff3/files/kdiff3/0.9.97/

Besides, you can install any other diffmerge tool too and configure GE to use that. For instance I don't like kdiff and use perforce's p4merge instead.

此外,您也可以安装任何其他 diffmerge 工具并配置 GE 以使用它。例如,我不喜欢 kdiff,而是使用 perforce 的 p4merge。

Btw you version is outdated, the current version is 2.50.02 (as of 11/17)

顺便说一句,您的版本已过时,当前版本为 2.50.02(截至 11/17)