Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I have pianobar installed and I'm trying to update it using brew update pianobar. I also tried brew update pianobar --force but that didn't have any effect. It says that I have local changes, but I'm not sure how to tell it to just overwrite these.

From http://github.com/mxcl/homebrew
 * branch            master     -> FETCH_HEAD
error: Your local changes to the following files would be overwritten by merge:
    Library/Formula/android-ndk.rb
    Library/Formula/android-sdk.rb
    Library/Formula/center-im.rb
    Library/Formula/putty.rb
    Library/Formula/python.rb
    ... (lines removed) ...
    Library/Formula/upx.rb
    Library/Formula/vimpager.rb
    Library/Homebrew/cmd/doctor.rb
Please, commit your changes or stash them before you can merge.
error: The following untracked working tree files would be overwritten by merge:
    Library/Formula/tth.rb
Please move or remove them before you can merge.
Updating 45bc7ad..36f4400
Aborting
Error: Failed while executing git pull http://github.com/mxcl/homebrew.git master
share|improve this question
2  
I think you have to use upgrade. update is for updating the formulas. –  Felix Sep 22 '11 at 18:19
add comment

migrated from stackoverflow.com Sep 23 '11 at 16:25

This question came from our site for professional and enthusiast programmers.

2 Answers

up vote 7 down vote accepted

I don't know why this happens with Homebrew when you don't do anything to mess with it, but here's how I fixed it:

  1. Change to your Homebrew cellar directory cd `brew --cellar`
  2. Reset git repository git reset --hard HEAD
  3. Upgrade pianobar, at last! brew upgrade pianobar

FYI, brew update will update Homebrew to the latest version, so you may want to do that before step 3.

share|improve this answer
    
did 1-3 and it worked as expected, thanks! but then when i try and run pianobar it says Login... Error: Protocol incompatible. Please upgrade libpiano. - any thoughts? also when i tried brew update i get error: The following untracked working tree files would be overwritten by merge: Library/Formula/tth.rb. Error: Failed while executing git pull github.com/mxcl/homebrew.git master - sorry i am new to homebrew and am really not sure what I'm doing. –  cwd Sep 23 '11 at 17:11
1  
Ah, git, you make life so fun!. Do cd `brew --prefix` then git clean -f then try brew update. As for the Pianobar issue, I'd try brew upgrade libpiano next, but I'm not using it, so I'm not certain. –  SWrobel Sep 23 '11 at 17:19
    
that worked, thanks so much for all the help! apparently the version of libpiano that is out is not yet new enough though since I'm still getting the error even though it says everything is up to date. –  cwd Sep 23 '11 at 17:24
    
Glad to help. I just installed pianobar and it works for me. I know Pandora has updated their protocol recently, but it seems Homebrew's Pianobar version is up to date. Mine is 2011.09.22, what's yours? It should show on the first line after you run pianobar. –  SWrobel Sep 23 '11 at 17:47
add comment

As @Felix said, use upgrade not update.

If the problem comes from your dirty git tree and you just want to forget about your modifications, type git reset --hard HEAD before upgrading.

share|improve this answer
    
nothing happens when i try that... brew upgrade pianobar -v gives Kernel.exit –  cwd Sep 23 '11 at 1:14
    
what do you get when you run type -a brew? –  Robert S Ciaccio Sep 23 '11 at 17:16
    
brew is /usr/local/bin/brew –  cwd Sep 23 '11 at 17:20
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.