Because the Mac built-in Git version is too low, IDEA has been prompting that the current Git is not supported. Today, record the upgrade process
Official source domestic access is too slow, switch to Tsinghua university source
$ cd "$(brew --repo)"
$ git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git
$ cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
$ git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
Copy the code
Update brew, upgrade brew, upgrade brew, upgrade brew
brew update && brew upgrade
Copy the code
Install git
brew install git
Copy the code
Brew install XXX brew install XXX brew install XXX
Pcre2 is missing. Install it
Install Git again. Because git is embedded in Mac, all installations will prompt you that git is available and cannot link
Execute commands as prompted to override existing Git
brew link --overwrite git
Copy the code
git version
Copy the code
Git Pointing
which git
Copy the code
where git
Copy the code
When selecting the development tool, select the path above and go here to install it
Reference:
[](Mac upgrade git-SegmentFault)
Git [] (MacOs upgrade to the latest version | developer tools BBS (learnku.com))