【发布时间】:2013-07-25 21:21:25
【问题描述】:
我正在跑步:
brew update
我得到一个错误:
error: Your local changes to the following files would be overwritten by merge:
samtools.rb
Please, commit your changes or stash them before you can merge.
Aborting
事实证明这是一个众所周知的错误。其实Homebrew wiki上面有提到:
After running brew update, you receive a git error warning about untracked files or local changes that would be overwritten by a checkout or merge, followed by a list of files inside your Homebrew installation.
This is caused by an old bug in in the update code that has long since been fixed. However, the nature of the bug requires that you do the following:
cd $(brew --repository)
git reset --hard FETCH_HEAD
If brew doctor still complains about uncommitted modifications, also run this command:
cd $(brew --repository)/Library
git clean -fd
我按照这些说明操作,但仍然看到同样的错误。怎么了?
【问题讨论】: