LoginSignup
3
3

More than 3 years have passed since last update.

brew update に失敗した時の対応

Last updated at Posted at 2013-11-30
% brew update    error: Your local changes to the following files would be overwritten by merge:
        Library/Formula/emacs.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

% git pull -q origin refs/heads/master:refs/remotes/origin/master
fatal: Not a git repository (or any of the parent directories): .git

意図してない変更がいつの間にか入っていてそれが原因でupdateできなくなっていた。

とりあえず、バージョンをもとに戻したいんだがどこで管理されてるのか理解してなくて再発しそうなので今回の対応をメモ

% cd  /usr/local 

% git status -sb
## master
 M Library/Formula/emacs.rb

% git reset  --hard HEAD~
HEAD is now at 41f0e36 groonga 3.0.6

% git status -sb
## master

これで無事復活!!

3
3
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
3
3