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
我跟着這些指示和我仍看到同樣的錯誤。哪裏不對?
謝謝!它修復了我的一個git衝突。 git reset --hard FETCH_HEAD究竟是什麼? –
當我有這個問題時,我不得不rm在/ usr/local/Formula/Library中的有問題的文件,然後「git reset --hard FETCH_HEAD」後沖泡更新工作 – petrocket
這是爲我做的,非常感謝你共享的! –