为什么我的 difftool 不再工作了?
Why is my difftool not working anymore?
以前可以用,但换了笔记本电脑后,就不能识别了。非常感谢任何帮助!
这是我尝试使用 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
您必须更改此行:
git difftool -t=kdiff3 master devSQC
通过:
git difftool -t kdiff3 master devSQC
或:
git difftool --tool=kdiff3 master devSQC
通常,像 -t
这样的短参数后面跟着一个 space 字符。像 --tool
这样的长选项后面跟着 =
。这是一种约定。
以前可以用,但换了笔记本电脑后,就不能识别了。非常感谢任何帮助!
这是我尝试使用 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
您必须更改此行:
git difftool -t=kdiff3 master devSQC
通过:
git difftool -t kdiff3 master devSQC
或:
git difftool --tool=kdiff3 master devSQC
通常,像 -t
这样的短参数后面跟着一个 space 字符。像 --tool
这样的长选项后面跟着 =
。这是一种约定。