git 软件更新到 macOS Big Sur 到 11.4 后 gui 不工作

git gui is not working after software update to macOS Big Sur to 11.4

每当我尝试在终端上执行 'git gui' 命令时,它都会显示

/usr/local/git/libexec/git-core/git-gui: line 8: /usr/local/git/share/git-gui/lib/Git Gui.app/Contents/MacOS/Wish: No such file or directory
/usr/local/git/libexec/git-core/git-gui: line 8: exec: /usr/local/git/share/git-gui/lib/Git Gui.app/Contents/MacOS/Wish: cannot execute: No such file or directory

我今天在 macOS Big Sur 的软件更新后遇到了这个问题。 当前版本为 11.4

在我的例子中,使用覆盖符号链接的新安装 git 有效:

$ brew uninstall git
$ brew install git

# Force the link and overwrite all conflicting files
$ brew link --overwrite git

# List all files that would be deleted
$ brew link --overwrite --dry-run git

# Force the link and overwrite all conflicting files:
$ brew link --overwrite autoconf

# All files that would be deleted:
$ brew link --overwrite --dry-run autoconf

重新安装 git 和 git-gui。

$ brew uninstall git
$ brew install git
$ brew install git-gui
$ brew link git-gui

问题现已解决。

首先,当我执行 git --version 时,它返回 git version 2.23.0

作为人们提供的一些解决方案,同时使用 $ brew uninstall git 卸载 git。又遇到了 No available formula or cask with the name "git".

的问题

使用 /usr/local/git/uninstall.sh 卸载 git 后。 git 命令 git --version 返回 git version 2.24.3 (Apple Git-128)

现在仅使用 Apple 分发 Git。

结论, 只需执行 /usr/local/git/uninstall.sh