1

它曾经可以工作,但在更换我的笔记本电脑后,它不再被识别。非常感谢任何帮助!

这是我尝试使用 Git Bash ( git version 2.16.2.windows.1) 的方法:

$ git config --list --show-origin
...
file:"C:\\Git\\mingw64/etc/gitconfig"   difftool.kdiff3.cmd='C:/Program Files/KDiff3/kdiff3' $LOCAL $REMOTE
file:"C:\\Git\\mingw64/etc/gitconfig"   difftool.kdiff3.keepbackup=false
file:"C:\\Git\\mingw64/etc/gitconfig"   difftool.kdiff3.trustexitcode=false
file:"C:\\Git\\mingw64/etc/gitconfig"   merge.conflictstyle=diff3
...

我复制了旧的工作配置文件。但是之后:

$ git difftool master devSQC

This message is displayed because 'diff.tool' is not configured.
See 'git difftool --tool-help' or 'git help config' for more details.
'git difftool' will now attempt to use one of the following tools:
kompare emerge vimdiff
...

$ git difftool --tool-help
'git difftool --tool=<tool>' may be set to one of the following:
                vimdiff
                vimdiff2
                vimdiff3

        user-defined:
                kdiff3.cmd 'C:/Program Files/KDiff3/kdiff3' $LOCAL $REMOTE

The following tools are valid, but not currently available:
                araxis
                bc
                bc3
                codecompare
                deltawalker
                diffmerge
                diffuse
                ecmerge
                emerge
                examdiff
                gvimdiff
                gvimdiff2
                gvimdiff3
                kdiff3
                kompare
                meld
                opendiff
                p4merge
                tkdiff
                winmerge
                xxdiff

Some of the tools listed above only work in a windowed
environment. If run in a terminal-only session, they will fail.

$ git difftool -t=kdiff3 master devSQC

Viewing (1/61): '.gitignore'
Launch '_kdiff3' [Y/n]? y
Unknown merge tool _kdiff3
fatal: external diff died, stopping at .gitignore
4

1 回答 1

3

您必须更改此行:

git difftool -t=kdiff3 master devSQC

通过以下任一方式:

git difftool -t kdiff3 master devSQC

或者:

git difftool --tool=kdiff3 master devSQC

通常,短参数-t后跟一个空格字符。像这样的长选项--tool后跟一个=. 这是一种约定。

于 2018-04-23T14:51:05.357 回答