22
21

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

brew updateでerror: Your local changes to the following files would be overwritten by merge と言われる解決方法

Last updated at Posted at 2015-01-06

brew updateしたらエラーがでました。

brewのupdateでエラー
brew update
error: Your local changes to the following files would be overwritten by merge:
	Library/Formula/libxslt.rb
Please, commit your changes or stash them before you can merge.
error: Your local changes to the following files would be overwritten by merge:
	Library/brew.rb
Please, commit your changes or stash them before you can merge.
Aborting
Error: Failure while executing: git pull -q origin refs/heads/master:refs/remotes/origin/master

brewがこわれてるみたいなので最新にするといいみたいです。

brewのリポジトリを新しくする
cd $(brew --prefix)
git fetch origin
git reset --hard origin/master

git logをしたらコミットが変わっていました。

なので次にbrewをupdateすると成功すると思います。

brewのupdate
brew update

今度は成功しました。

22
21
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
22
21

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?