I have tried to install Homebrew on macOS Monterey by following the instructions at <https://brew.sh/>.

But it resulted in:

```
error: Not a valid ref: refs/remotes/origin/master
Error: Fetching /opt/homebrew/Library/Taps/homebrew/homebrew-core failed!
fatal: invalid upstream 'origin/master'
Failed during: /opt/homebrew/bin/brew update --force --quiet

```

![1](https://i.stack.imgur.com/LpspM.png)