如何在 msys2 中使用 gitk?

How to use gitk with msys2?

我在 Windows 10 中使用 MSYS2。git 工作正常,但是 gitk 给出错误:

/usr/bin/gitk: line 3: exec: wish: not found

一些谷歌搜索表明这可能是因为没有安装 TK,但我试过了:

pacman -S tk

给出了错误:

error: target not found: tk

如何让 gitk 在这种环境下工作?

我确认 C:\prgs\git\PortableGit-2.7.0-64-bit\cmd\gitk.exe 工作正常。

确保您是从常规 CMD 会话或从 C:\prgs\git\PortableGit-2.7.0-64-bit\git-bash.exe

执行它

我不会尝试 运行 它来自 Cygwin 会话。

尝试运行64位MinGWshell(MSYS2提供的三种环境之一),安装包mingw-w64-x86_64-tk,然后运行gitk.

Gitk 在我的系统上运行,wish 提供 /mingw64/bin/wish.exe