和标题上说的差不多。我正在尝试使用以下命令更新自制软件
brew update并且我总是收到错误消息
$ brew update
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
Error: Failure while executing: git checkout -q masterbrew doctor命令输出如下所示:
$ brew doctor
Warning: Missing git origin remote.
Without a correctly configured origin, Homebrew won't update
properly. You can solve this by adding the Homebrew remote:
cd /usr/local
git remote add origin https://github.com/Homebrew/homebrew.git
fatal: Not a git repository (or any of the parent directories): .git当我跑的时候
cd /usr/local
git remote add origin https://github.com/Homebrew/homebrew.git我得到了
$ cd /usr/local
$ git remote add origin https://github.com/Homebrew/homebrew.git
fatal: Not a git repository (or any of the parent directories): .git我能做些什么来摆脱这个问题呢?git似乎不能识别自制的存储库,我应该使用什么来代替这个建议的存储库呢?
发布于 2014-01-30 12:39:30
我也遇到了同样的问题,只需使用以下命令在一个临时位置克隆homebrew存储库
git clone https://github.com/Homebrew/homebrew.git并将生成的本地目录移动到/usr/ .git,覆盖那里已有的目录。在那之后,我必须签出一些目录:
cd /usr/local
git checkout Library/Formula/
git checkout Library/Contributions/
git checkout Library/ENV/
git checkout Library/Homebrew/https://stackoverflow.com/questions/21267220
复制相似问题