何か1月に一回はコケててそのたびに直し方を検索してる気がするのでメモ
[yasui@Yasui-MBA2: ~][15:35] $ brew update
error: Your local changes to the following files would be overwritten by merge:
Library/Contributions/brew_bash_completion.sh
Library/Contributions/brew_zsh_completion.zsh
Library/Contributions/cmd/brew-services.rb
...
L
error: The following untracked working tree files would be overwritten by merge:
Library/Aliases/vid.stab
...
Library/Formula/sparkey.rb
Please move or remove them before you can merge.
Aborting
Error: Failure while executing: git pull -q origin refs/heads/master:refs/remotes/origin/master
[yasui@Yasui-MBA2: ~][15:35] $ cd /usr/local
[yasui@Yasui-MBA2: /usr/local][15:36] $ git fetch
[yasui@Yasui-MBA2: /usr/local][15:36] $ git reset --hard origin/master
error: unable to unlink old 'README.md' (Permission denied)
fatal: Could not reset index file to revision 'origin/master'.
[yasui@Yasui-MBA2: /usr/local][15:39] $ sudo git reset --hard origin/master
Password:
HEAD is now at cd9c98b Use .diff instead of .patch for github commit sourced patches
[yasui@Yasui-MBA2: /usr/local][15:39] $
そんな感じ。