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:
    ... (lines removed) ...
Please, commit your changes or stash them before you can merge.
error: The following untracked working tree files would be overwritten by merge:
Please move or remove them before you can merge.
Updating 45bc7ad..36f4400
Error: Failed while executing git pull http://github.com/mxcl/homebrew.git master
  • 3
    I think you have to use upgrade. update is for updating the formulas.
    – Felix
    Sep 22, 2011 at 18:19

3 Answers 3


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.

  • 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, 2011 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, 2011 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, 2011 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, 2011 at 17:47

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.

  • nothing happens when i try that... brew upgrade pianobar -v gives Kernel.exit
    – cwd
    Sep 23, 2011 at 1:14
  • what do you get when you run type -a brew? Sep 23, 2011 at 17:16
  • brew is /usr/local/bin/brew
    – cwd
    Sep 23, 2011 at 17:20

This is a general answer, not specific to your pianobar problem.

To update installed software, first update brew: brew update

and then upgrade the installed software: brew upgrade

To prevent some software from being upgraded, do brew pin YOUR-PACKAGE-HERE

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .