title: Can't update or upgrade Homebrew
body: <p>I can no longer run either <code>brew upgrade</code> or <code>brew update</code>: both abort with</p>
  <pre><code>Error: homebrew-core is a shallow clone. To `brew update` first run:
    git -C &quot;/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core&quot; fetch --unshallow
  </code></pre>
  <p>and if I follow this suggestion and run <code>git ... --unshallow</code> and then try <code>brew update</code> or <code>brew upgrade</code> I still get the same error message.</p>
  <p>If I then try the command again (maybe I didn't do it right the first time?) I get</p>
  <p><code>fatal: --unshallow on a complete repository does not make sense</code></p>
  <p>How do I get past this error message to run <code>brew upgrade</code> or <code>brew update</code> without errors?</p>
  <hr />
  <pre><code>HOMEBREW_VERSION: 2.6.0-82-gde1afcb
  ORIGIN: https://github.com/Homebrew/brew.git
  HEAD: de1afcbfc58fb3cd5779bd8fbb6b9995700dda4c
  Last commit: 30 hours ago
  Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
  Core tap HEAD: a7c63b0f7f7ae416a2f961b263155281759ac3a7
  Core tap last commit: 29 hours ago
  Core tap branch: master
  HOMEBREW_PREFIX: /usr/local
  HOMEBREW_CASK_OPTS: []
  HOMEBREW_DISPLAY: /private/tmp/com.apple.launchd.FwPJPzeLfq/org.macosforge.xquartz:0
  HOMEBREW_EDITOR: /usr/local/bin/bbedit
  HOMEBREW_MAKE_JOBS: 4
  HOMEBREW_NO_ANALYTICS: set
  HOMEBREW_NO_EMOJI: set
  Homebrew Ruby: 2.6.3 =&gt; /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
  CPU: quad-core 64-bit haswell
  Clang: 12.0 build 1200
  Git: 2.29.2 =&gt; /usr/local/bin/git
  Curl: 7.64.1 =&gt; /usr/bin/curl
  Java: 1.8.0_172
  macOS: 10.15.7-x86_64
  CLT: 12.0.32.27
  Xcode: 12.2
  XQuartz: 2.7.11 =&gt; /opt/X11
  </code></pre>