brew install git
/usr/local/bin $ git --version git version 2.17.2 (Apple Git-113)
Mac通过home-brew安装Git
原文:https://www.cnblogs.com/qingmuchuanqi48/p/13196437.html