$ brew doctor
Warning: Homebrew‘s sbin was not found in your PATH but you have installed
formulae that put executables in /usr/local/sbin.
Consider setting the PATH for example like so:
echo ‘export PATH="/usr/local/sbin:$PATH"‘ >> ~/.zshrc
$ vim ~/.zshr
将 export PATH="/usr/local/sbin:$PATH 添加到配置文件中
$ source ~/.zshrc
$ which git
$ git --version
解决zsh: command not found: gitk,将git路径/usr/bin/git修改为/usr/local/bin/git
原文:https://www.cnblogs.com/nayek/p/13289200.html