尝试比较 lfs 跟踪文件时,TortoiseGit 响应“/usr/bin/sh: git-lfs: 命令未找到”

TortoiseGit responding "/usr/bin/sh: git-lfs: command not found" when attempting diff of lfs tracked file

我正在尝试使用 TortoiseGit 执行 LabVIEW (.vi) 文件的差异。我收到以下错误:

Failed to checkout file "*****.vi" of revision ### to
"C:\Users\***\TortoiseGit\*****-###.vi".
libgit2 returned: External filter application exited non-zero (127) and reported:
/usr/bin/sh: git-lfs: command not found

我在 GitLab 服务器上使用 TortoiseGit 2.8.0.0。我启用了 lfs。用 lfs 跟踪的任何文件类型似乎都有这个问题。关于问题所在,错误消息似乎很简单,但我不清楚如何解决它。

尝试在更改 PATH 后启动 TortoiseGit,添加:

C:\Program Files\Git\mingw64\bin

git-lfs.exe%GH%\mingw64\bin

./mingw64/bin/git-lfs.exe

这意味着 TortoiseGit 将能够在使用正确的 %PATH% 值启动时执行“git lfs”。