Brew更新错误

and*_*ynh 16 homebrew

我正在使用macbook并在我的机器上安装了ruby.我想安装一个ruby gem但是想先更新HomeBrew.我在我的主文件夹中运行'brew update'并收到此错误:

 error: The following untracked working tree files would be overwritten by merge:
Library/Formula/vcprompt.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
Run Code Online (Sandbox Code Playgroud)

我尝试进入库/公式文件夹,但它在我的机器上不存在.我不知道该怎么做.

小智 47

cd/usr/local && git reset --hard FETCH_HEAD

或者如果失败了

cd/usr/local && sudo git reset --hard FETCH_HEAD