How to Solve Error: homebrew-core is a shallow clone.

Error: homebrew-core is a shallow clone.
mac use homebrew error:

 

Solution:

cd /usr/local/Homebrew/Library/Taps/homebrew
rm -rf homebrew-core
brew upgrade

Homebrew core will be updated again after brew upgrade

Read More: