brew doctor

Let's you know what should be fixed in your home brew.

brew update

The following untracked working tree files would be overwritten by merge

When running brew update, I occationally get this error.

Solution:

cd /usr/local
git fetch origin
git reset --hard origin/master

Stack overflow solution