How do I update Homebrew?

后端 未结 2 1024
无人及你
无人及你 2020-12-23 10:54

When I ran:

brew update

I got a message saying it initialized an empty repository in /usr/local/.git/, then I got this error:<

相关标签:
2条回答
  • 2020-12-23 11:38

    Alternatively you could update brew by installing it again. (Think I did this as El Capitan changed something)

    Note: this is a heavy handed approach that will remove all applications installed via brew!

    Try to install brew a fresh and it will tell how to uninstall.

    At original time of writing to uninstall:

    ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
    

    Edit: As of 2020 to uninstall:

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh)"
    
    0 讨论(0)
  • 2020-12-23 11:43
    • cd /usr/local
    • git status
    • Discard all the changes (unless you actually want to try to commit to Homebrew - you probably don't)
    • git status til it's clean
    • brew update
    0 讨论(0)
提交回复
热议问题