I can't uninstall Git

允我心安 提交于 2019-12-05 05:19:10
VonC

To see where git is installed:

which git

See for instance those guides:

The location usually is:

/usr/local/git/bin/git

As mentioned in "Can't seem to uninstall git":

/opt/local/bin is the location of software installed by macports, so you'll want to run this:

sudo port uninstall git

If you see /usr/local/bin/git, that is likely a brew installation: see "Can't use homebrew installed git":

brew uninstall git
# make sure everything is alright, maybe brew will give you some hint
brew doctor
brew update  
brew install git
# magic happen, brew will give you hint /usr/bin occurs before /usr/local/bin
# and recommend you run following command
brew doctor
echo 'export PATH="/usr/local/bin:$PATH"' >> ~/.bash_profile
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!