MacOS安装git
1。安装brew(可百度brew官网,参考安装)
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
2.安装git
brew install git
3.备份旧的git
cd /usr/local/bin mkdir backup-git mv git* ./backup-git/
4.找到新的git安装目录
cd /usr/local/Cellar/git/2.20.1
5.回到根目录,配置环境变量
cd ~ vim .bash_profile #输入 export GIT=/usr/local/Cellar/git/2.20.1 export PATH=$GIT/bin:$PATH :wq
6.刷新环境变量,使配置生效
source .bash_profile
参考资料:[1]: https://www.cnblogs.com/songt...
相关推荐
formula 2020-11-12
huhongfei 2020-11-05
乾坤一碼農 2020-10-27
liumengyanysu 2020-10-22
E哥的aws认证攻略 2020-10-15
tianyafengxin 2020-10-08
guying 2020-10-05
好脑筋不如烂笔头 2020-09-17
nebulali 2020-09-11
佛系程序员J 2020-09-15
fenggit 2020-09-15
JustHaveTry 2020-09-11
兄dei努力赚钱吧 2020-09-06
IngeniousIT 2020-08-25
liumengyanysu 2020-08-17
guying 2020-08-16