Homebrew / legacy-homebrew

💀 The former home of Homebrew/homebrew (deprecated)
https://brew.sh
26.97k stars 11.35k forks source link

Error:brew update #36261

Closed constant0924 closed 9 years ago

constant0924 commented 9 years ago

When I perform the brew the update

error: Your local changes to the following files would be overwritten by merge:
    README.md
    apple-gcc42.rb
    diffutils.rb
    file-formula.rb
    gdb.rb
    gpatch.rb
    gperf.rb
    grep.rb
    groff.rb
    gzip.rb
    libiconv.rb
    libpcap.rb
    lsof.rb
    nano.rb
    ncurses.rb
    openssh.rb
    screen.rb
    tcl-tk.rb
    tcpdump.rb
    units.rb
    whois.rb
    zlib.rb
Please, commit your changes or stash them before you can merge.
Aborting
Error: Failed to update tap: homebrew/dupes
error: Your local changes to the following files would be overwritten by merge:
    Abstract/abstract-php-extension.rb
    Abstract/abstract-php-version.rb
    Abstract/abstract-php.rb
    Formula/box.rb
    Formula/composer.rb
    Formula/drush.rb
    Formula/php-code-sniffer.rb
    Formula/php-cs-fixer.rb
    Formula/php53-blitz.rb
    Formula/php53-gmagick.rb
    Formula/php53-http.rb
    Formula/php53-mongo.rb
    Formula/php53-phalcon.rb
    Formula/php53-pthreads.rb
    Formula/php53-redis.rb
    Formula/php53-redland.rb
    Formula/php53-swoole.rb
    Formula/php53-thrift.rb
    Formula/php53-twig.rb
    Formula/php53-vld.rb
    Formula/php53-xcache.rb
    Formula/php53-xdebug.rb
    Formula/php53-yaf.rb
    Formula/php53.rb
    Formula/php54-augmentedtypes.rb
    Formula/php54-blitz.rb
    Formula/php54-gmagick.rb
    Formula/php54-http.rb
    Formula/php54-mongo.rb
    Formula/php54-opcache.rb
    Formula/php54-phalcon.rb
    Formula/php54-pthreads.rb
    Formula/php54-redis.rb
    Formula/php54-redland.rb
    Formula/php54-swoole.rb
    Formula/php54-thrift.rb
    Formula/php54-twig.rb
    Formula/php54-vld.rb
    Formula/php54-xcache.rb
    Formula/php54-xdebug.rb
    Formula/php54-yaf.rb
    Formula/php54.rb
    Formula/php55-augmentedtypes.rb
    Formula/php55-blitz.rb
    Formula/php55-gmagick.rb
    Formula/php55-http.rb
    Formula/php55-mongo.rb
    Formula/php55-phalcon.rb
    Formula/php55-pthreads.rb
    Formula/php55-redis.rb
    Formula/php55-redland.rb
    Formula/php55-swoole.rb
    Formula/php55-thrift.rb
    Formula/php55-twig.rb
    Formula/php55-vld.rb
    Formula/php55-xcache.rb
    Formula/php55-xdebug.rb
    Formula/php55-yaf.rb
    Formula/php55.rb
    Formula/php56-augmentedtypes.rb
    Formula/php56-blitz.rb
    Formula/php56-gmagick.rb
    Formula/php56-http.rb
    Formula/php56-mongo.rb
    Formula/php56-phalcon.rb
    Formula/php56-pthreads.rb
    Formula/php56-redis.rb
    Formula/php56-swoole.rb
    Formula/php56-thrift.rb
    Formula/php56-twig.rb
    Formula/php56-vld.rb
    Formula/php56-xcache.rb
    Formula/php56-xdebug.rb
    Formula/php56-yaf.rb
    Formula/php56.rb
    Formula/phpdox.rb
    Formula/phpmd.rb
    Formula/phpmyadmin.rb
    Formula/wp-cli.rb
    README.md
Please, commit your changes or stash them before you can merge.
Aborting
Error: Failed to update tap: josegonzalez/php

Excuse me, is there a way to solve

MikeMcQuaid commented 9 years ago

Try running: cd /usr/local; git fetch; git reset --hard origin/master; brew update

constant0924 commented 9 years ago

@mikemcquaid I tried to carry out your stated after the command, finally the brew update or appear the same problem

MikeMcQuaid commented 9 years ago

Sorry but you have not followed the requested steps on the Troubleshooting page: https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Troubleshooting.md#troubleshooting

Please follow (all of) these steps and post the information here so we can help you with your problem.

Thanks!

constant0924 commented 9 years ago

@mikemcquaid Thank you for your help! I have found the solution, switch to the wrong directory synchronization server copy again

WardF commented 9 years ago

As of today, I'm seeing the same issue as the original reporter. Following the troubleshooting steps from @mikemcquaid, as well as the the page he linked to, did not work. Here's what's happening.

What's Happening

HEAD is now at fd3e4f7 leiningen 2.5.1

  • brew update - Problem :( I get the same error originally reported for this issue (omitted for brevity).

I've created gists for brew config and brew doctor.

Thanks for any help you can provide!

jacknagel commented 9 years ago

The problem is occuring in individual taps, not the core repository.

Same instructions, except change cd /usr/local to

cd $(brew --repository)/Library/Taps/Homebrew/homebrew-dupes

or

cd $(brew --repository)/Library/Taps/josegonzalez/homebrew-php

substitute other tap names as appropriate.