26
24

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.

Homebrewでbrew updateに失敗した際の対処方法

Last updated at Posted at 2013-11-11

エラー時

$ brew update
error: Your local changes to the following files would be overwritten by merge:
     share/man/man1/brew.1
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

直すgitコマンド

$ cd /usr/local
$ git add .
$ git stash
$ git reset --hard

git add . で全てのファイルをステージしたあとに、
git stash でそれをスタックに入れて作業を隠し、
git reset --hard で全て同じライン(history位置)にしてる。

これで、brew update が出来ました。

26
24
1

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
26
24

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?