博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
MacOS安装git
阅读量:7014 次
发布时间:2019-06-28

本文共 413 字,大约阅读时间需要 1 分钟。

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/binmkdir backup-gitmv 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.1export PATH=$GIT/bin:$PATH:wq

6.刷新环境变量,使配置生效

source .bash_profile

参考资料:[1]:

转载地址:http://xqqtl.baihongyu.com/

你可能感兴趣的文章
eclipse连接android设备的问题
查看>>
localstorage 在各个浏览器下面的坑
查看>>
CentOS VirtualBox虚拟机多网卡配置
查看>>
一篇文章看完就让你能迅速读懂tcl程序==被误解的Tcl (Tcl the Misunders...
查看>>
cordova jpush 插件 生产环境得不到 registrationId
查看>>
Qt学习笔记(7)—— ButtonBox
查看>>
Hive连接查询join用法详解
查看>>
React Native 轻松集成分享功能(Android 篇)
查看>>
《902团队活力之我见》---展示()
查看>>
.pem引发的血案
查看>>
如何在rootscope 获取angular ui的tab子域 scope 也叫子域暴露
查看>>
Mongoose入门
查看>>
Css 常用样式
查看>>
HashMap,HashTable,HashSet区别
查看>>
如何学习iOS开发——对新手的几句废话
查看>>
无延时显示Toast的方法
查看>>
tomcat安全防护之普通用户运行
查看>>
分布式锁与实现(一)——基于Redis实现
查看>>
python学习 dict set 的用法(四)
查看>>
双机热备份的切换时间是这么确定的
查看>>