请检查我的配置。安装后我的 vimdiff 无法使用 GIT

Please review my config. My vimdiff not working with GIT after setup

为了使 vimdiff 成为我在 git 下的默认差异工具,我使用了以下命令。

# git config --global diff.tool vimdiff
# git config --global difftool.prompt false
# git config --global alias.diff difftool

当我输入

时,我的 git 配置文件如下所示
# git config -l

diff.tool=vimdiff
merge.tool=vimdiff
difftool.prompt=false
alias.diff=difftool
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
branch.master.remote=origin
branch.master.merge=refs/heads/master

当我 运行 git diff 它仍然使用 less 方法并在线显示我的差异而不是使用 vimdiff 程序。我在阻止 git 使用 vimdiff 的配置中遗漏了什么?

来自man git-config

To avoid confusion and troubles with script usage, aliases that hide existing Git commands are ignored.

diff 是现有的 git 命令,因此您的别名将被忽略。