-
-
Notifications
You must be signed in to change notification settings - Fork 11.3k
brew update result in git merge message in editor #13987
Comments
This is normal if you've made any changes in On Lion with the system git, this message didn't appear. It's a new git feature, and it can be turned off with an environment variable (I forget which). |
I'm using the homebrew version of git: $ which git The only change I made to /usr/local/Library was adding the new formula. Once it was merged into homebrew, I switched back to the main repository (instead of my clone). Searching the git docs, I found what I think is the correct environment variable. |
Not a Homebrew bug. if it wants you to merge everytime then you are merging everytime, I suggest you hard reset. |
I did Is there anything else I should try? |
I imagine you hard reset to your fork rather than to mine. Try again. |
In case anyone else is experiencing this same issue, I was seeing the same behavior and was able to fix it by issuing "git reset --hard origin/master" in /usr/local. |
I ram upon a similar issue, and I've been ignoring it for a while. (I just fixed it.) I didn't (consciously) edit any files. I'm pretty sure the changes were caused through normal use of the brew command; but I don't really know or care. I agree Not a Homebrew bug. However, the user experience could be enhanced. the error: $ brew update
error: Your local changes to the following files would be overwritten by merge:
Library/Contributions/cmds/brew-pull.rb
Library/Contributions/cmds/brew-services.rb
Library/Contributions/cmds/brew-test-bot.rb
Library/Contributions/manpages/brew.1.md
Library/ENV/4.3/make
Please, commit your changes or stash them before you can merge.
error: The following untracked working tree files would be overwritten by merge:
Library/Aliases/ag
Library/Aliases/qt4 All it said was 'Library'. Does it mean: ~/Library/, /Library/, /System/Library/? I had no idea, and of corse the answer was none of the above. Having a hint to where the issue was would have been helpful. To help my coworkers who are new to git, I've pasted the following commands:
It's a last resort, "I have no idea what's going on. Just make it work again!" It has saved a few soles from rm -f and git cloning a repo. Is there any harm in adding a If they know what they've done, they can fix it. If they don't care, they just don't care. |
|
A while back I cloned homebrew in order to add a new formula. Since then, whenever I do a
brew upgrade
, I get a new git merge window in MacVim (my default editor) with the contents "Merge branch 'master' of https://github.com/mxcl/homebrew".After saving the buffer, the update proceeds as usual.Checking git status in the homebrew directory (/usr/local/) gives:
# On branch master
nothing to commit (working directory clean)
brew doctor
gives no errors. This is an annoying problem, and I haven't been able to find any solutions by searching.The text was updated successfully, but these errors were encountered: