failed log:

$sudo brew update
error: Your local changes to the following files would be overwritten by merge:
    Library/Aliases/gperftools
    Library/Aliases/hashdeep
    Library/Aliases/htop
    Library/Aliases/nodejs
    Library/Aliases/ocio
    Library/Aliases/oiio
        ....
error: The following untracked working tree files would be overwritten by merge:
    Library/Aliases/gperftools
    Library/Aliases/hashdeep
    Library/Aliases/htop
    Library/Aliases/nodejs
    Library/Aliases/ocio
    Library/Aliases/oiio
        ....
Aborting
Error: Failure while executing: git pull -q origin refs/heads/master:refs/remotes/origin/master

Solution:

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

reference [read]