How do I update Homebrew?

When I ran:

brew update

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

  • Why would I want to do git rebase?
  • git-flow vs. normal git commands
  • git: remove duplicate commits from public branch?
  • How to find which commits removed a line that contain a specific string?
  • Using Git for collaboration on a 4 person project
  • GIT: Can't Push (Strange Config Issue)
  • Screenshot

  • Executing git commands on a bare repository
  • How can I use version control in a more powerful way?
  • Best way to integrate Git with Ant?
  • Cannot apply stash to working directory
  • How to install git bash on ubuntu?
  • Can't push to GitHub on this box
  • 2 Solutions collect form web for “How do I update Homebrew?”

    • 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

    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"
    Git Baby is a git and github fan, let's start git clone.