首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >Brew更新错误

Brew更新错误
EN

Stack Overflow用户
提问于 2013-03-29 06:11:33
回答 1查看 6.1K关注 0票数 16

我正在使用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

我尝试进入库/公式文件夹,但它在我的机器上不存在。我不确定从这里该做什么。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-03-30 00:21:39

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

或者如果它失败了

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

票数 47
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/15693078

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档