解決zsh: command not found: gitk,將git路徑/usr/bin/git修改為/usr/local/bin/git


一、通過homebrew查看是否有異常(首先你得安裝了Homebrew)

$ brew doctor

二、根據提示修改zsh配置

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 ~/.zshrc

將 export PATH="/usr/local/sbin:$PATH 添加到配置文件中

$ source ~/.zshrc

$ which git 

$ git --version

四、如果還是不行只需要手動下載git-gui即可

$ brew install git-gui

也可參考鏈接:https://www.jianshu.com/p/7c6577dec016


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM