This repository has been archived by the owner on Jul 4, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Users were seeing local changes in their repository after updating, even though they had made no local changes. The repository setup sequence should use `git reset --soft` rather than vanilla `git reset`, which defaults to '--mixed'. '--soft' updates _only_ HEAD, leaving the index as-is, allowing future incantations of `brew update` to proceed without errors. Fixes #6732.
- Loading branch information
cbcd4a3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do a "brew update && brew upgrade" about once a week. Recently it's started throwing errors such as:
error: Your local changes to the following files would be overwritten by merge:
Library/Formula/bulk_extractor.rb
Library/Formula/wine.rb
Please, commit your changes or stash them before you can merge.
The formulas aren't consistent (e.g.: different formulas each time) and I haven't made any local edits. If I update again within a short time frame the issue doesn't re-occur.
cbcd4a3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to
git reset --hard FETCH_HEAD
inside your Homebrew installation. This fix isn't retroactive, i.e. it doesn't help people whose installation was already broken by the original bug. But after you run the aformentioned, it should be smooth sailing from then on.cbcd4a3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
worked like a charm, thanks!