かもメモ

自分の落ちた落とし穴に何度も落ちる人のメモ帳

Homebrew brew update で Error: homebrew-core is a shallow clone

開発環境アップデートしたからコマンド実行して〜って言われてやろうとしたら brew update でエラーになった。

$ brew update
Error: homebrew-core is a shallow clone. To `brew update` first run:
  git -C "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core" fetch --unshallow

このコマンド叩いてね。って出てるけど、そのままコピペしても何も起こらない…

git の fetch が出来てないから先に fetch する必要があった

--unshallow なしのコマンドで先に fetch すれば OK

$ git -C "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core" fetch
# 完了したら --unshallow オプション付きで実行
$ git -C "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core" fetch --unshallow
remote: Enumerating objects: …
# 完了したら brew update できるようになっている
$ brew update

おわり。

開発環境の再構築だいたいハマるので docker になってもあまり変わらないイメージ…


[参考]

みんなでアジャイル ―変化に対応できる顧客中心組織のつくりかた

みんなでアジャイル ―変化に対応できる顧客中心組織のつくりかた

  • 作者:Matt LeMay
  • 発売日: 2020/03/19
  • メディア: 単行本(ソフトカバー)