LoginSignup
0
1

More than 5 years have passed since last update.

brew updateが失敗したが直ったメモ

Last updated at Posted at 2015-01-12

正しいやり方とか知らないけど直った超適当解決メモ。。

$ brew update
error: Your local changes to the following files would be overwritten by merge:
        file-formula.rb
        lsof.rb
        openssh.rb
        whois.rb
Please, commit your changes or stash them before you can merge.
Aborting
Error: Failed to update tap: homebrew/dupes
Already up-to-date.

みたいなエラーが出た。
↓この場所に移動してみたら、こんなんなっててgit pullが出来なくなってたので。

$ cd /usr/local/Library/Taps/homebrew/homebrew-dupes
$ git status
On branch master
Your branch is behind 'origin/master' by 53 commits, and can be fast-forwarded.
  (use "git pull" to update your local branch)
Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

        modified:   diffutils.rb
        modified:   fetchmail.rb
        modified:   file-formula.rb
        modified:   gdb.rb
        modified:   grep.rb
        modified:   groff.rb
        modified:   libpcap.rb
        modified:   lsof.rb
        modified:   nano.rb
        modified:   ncurses.rb
        modified:   openldap.rb
        modified:   openssh.rb
        modified:   rsync.rb
        modified:   tcl-tk.rb
        modified:   tcpdump.rb
        modified:   whois.rb

↓バッサリ綺麗にする。

$ cd /usr/local/Library/Taps/homebrew/homebrew-dupes
$ git reset --hard
$ git pull

で、再度実行。

$ brew update
:
Already up-to-date.

直った!

0
1
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
0
1