Mar*_*ute 30 git macos terminal homebrew iterm
不确定这个问题是否与升级到MacOs Sierra有关,但从那时起,当我运行'brew update'时会出现此错误
? brew update
Checking out v1.0.0 in /usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask...
To checkout master in /usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask run:
'cd /usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask && git checkout master
fatal: Cannot update paths and switch to branch 'v1.0.0' at the same time.
Did you intend to checkout 'refs/tags/1.0.0' which can not be resolved as commit?
fatal: Needed a single revision
invalid upstream refs/tags/1.0.0
Checking out v1.0.0 in /usr/local/Homebrew/Library/Taps/dart-lang/homebrew-dart...
To checkout master in /usr/local/Homebrew/Library/Taps/dart-lang/homebrew-dart run:
'cd /usr/local/Homebrew/Library/Taps/dart-lang/homebrew-dart && git checkout master
fatal: Cannot update paths and switch to branch 'v1.0.0' at the same time.
Did you intend to checkout 'refs/tags/1.0.0' which can not be resolved as commit?
fatal: Needed a single revision
invalid upstream refs/tags/1.0.0
Checking out v1.0.0 in /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core...
To checkout master in /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core run:
'cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core && git checkout master
fatal: Cannot update paths and switch to branch 'v1.0.0' at the same time.
Did you intend to checkout 'refs/tags/1.0.0' which can not be resolved as commit?
fatal: Needed a single revision
invalid upstream refs/tags/1.0.0
Run Code Online (Sandbox Code Playgroud)
我试过跑步
cd $(brew --prefix) && git fetch && git reset --hard origin/master
Run Code Online (Sandbox Code Playgroud)
但它给了我这个错误:
fatal: Not a git repository (or any of the parent directories): .git
Run Code Online (Sandbox Code Playgroud)
tho*_*asd 59
升级到Sierra之后我遇到了同样的问题.
除了brew --prefix显示Homebrew的安装路径之外,还brew --repository显示了它的.git目录所在的位置.
man brew声称"对于标准安装,前缀和存储库是同一目录".无论是男人页过时的或我的安装是不是"标准",但我prefix就是/usr/local和我repository是/usr/local/Homebrew.
使用相同的命令,但cd $(brew --repository)为我工作:
cd $(brew --repository) && git fetch && git reset --hard origin/master
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4912 次 |
| 最近记录: |