반응형
Homebrew 업데이트 실패 :“제발, 변경 사항을 커밋하거나 병합하기 전에 숨김”
나는 달리고있다 :
brew update
그리고 오류가 발생합니다.
error: Your local changes to the following files would be overwritten by merge:
samtools.rb
Please, commit your changes or stash them before you can merge.
Aborting
이것은 잘 알려진 오류로 밝혀졌습니다. 사실, Homebrew 위키 에 언급되어 있습니다 .
After running brew update, you receive a git error warning about untracked files or local changes that would be overwritten by a checkout or merge, followed by a list of files inside your Homebrew installation.
This is caused by an old bug in in the update code that has long since been fixed. However, the nature of the bug requires that you do the following:
cd $(brew --repository)
git reset --hard FETCH_HEAD
If brew doctor still complains about uncommitted modifications, also run this command:
cd $(brew --repository)/Library
git clean -fd
지침을 따랐지만 여전히 동일한 오류가 표시됩니다. 뭐가 잘못 되었 니?
직접 문제를 해결할 수있었습니다.
저에게 팁을 준 것은 "git status"를 실행하는 것이 해당 파일을 표시하지 않았습니다.
일반적인 솔루션을 사용하는 대신 :
cd $(brew --repository)
git reset --hard FETCH_HEAD
나는해야했다 :
cd [directory of the file in question]
git reset --hard FETCH_HEAD
문제가 해결되었습니다.
이것은 나를 위해 수정했습니다.
https://stackoverflow.com/a/20138806
cd `brew --prefix`
git fetch origin
git reset --hard origin/master
numpy 수식에서 URL을 수동으로 수정 한 후이 문제가 발생했습니다. 나중에 다음과 같이 수정할 수있었습니다.
cd /usr/local/Library/Taps/homebrew/homebrew-python
git checkout -- numpy.rb
brew update
반응형
'developer tip' 카테고리의 다른 글
ASP.NET MVC에서 Tempdata 사용-모범 사례 (0) | 2020.11.17 |
---|---|
노드의 PassportJS가 로그 아웃시 세션을 제거하지 않는 이유 (0) | 2020.11.17 |
Websocket onerror-오류 설명을 읽는 방법? (0) | 2020.11.17 |
ASP.NET Core의 get 메서드에 여러 매개 변수를 전달하는 방법 (0) | 2020.11.17 |
ReSharper는 메서드가 정적 일 수 있지만 그렇지 않은 경우 불평합니다. (0) | 2020.11.17 |