rm -rf /usr/local/Homebrew/.git
brew update
brew config

reference