Sometimes when you run:
You get an error:
brew update the following untracked working tree files would be overwritten by merge
According to the repo wiki for Homebrew this is caused by an old bug in update that has long since been fixed.
Basically you have changed (uncommitted) files in your Homebrew working directory that you need to deal with. You simply need to reset the working directory so your update command can pull the latest files. If you’re familiar with git – then this will all make sense, if not, just run these 3 commands and your Homebrew will be fixed!
cd /usr/local git fetch origin git reset --hard origin/master