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:

  • EGit: why “Local branch as upstream is not recommended”?
  • What is the meaning of pull strategy when creating a branch with egit?
  • git reflog not showing branch change
  • Visual studio 2015 Update 2, TeamExplorer: where is the exclude option?
  • Best practice for ignoring files within a folder with GIT
  • Git says that some of my image files are untracked (they are not)
  • Screenshot

  • How to `git add` non-recursively?
  • Check who pushed a Git commit
  • How to grep search in modified files of working directory which are not yet been staged(indexed)?
  • Can I make vim respect my .gitignore files?
  • git clone -b tag results in - warning: Remote branch not found in upstream origin, using HEAD instead
  • Jenkins job for multilevel maven project
  • 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.