MacOS 升级 Git 版本 #47
onnttf
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
不吹牛的说,这篇文章绝对是目前网上最简单的 MacOS 系统的
Git
升级教程了安装 Homebrew
Homebrew 是一个软件包管理器。它的作用就是将软件包安装到自己的目录中,然后将其文件符号链接到
/usr/local
。更多信息,请自行进入官网查看。在将下面代码复制进终端,点击回车,然后打开零食,边吃边等就好。
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
升级 git
安装最新版的
git
当看到下面输出时,说明
git
已经安装完成:==> Summary 🍺 /usr/local/Cellar/git/2.20.1: 1,528 files, 41.3MB
改变
git
的默认指向在终端中查看我们的
git
指向和版本信息。接下来我们通过
brew link
将git
指向我们通过Homebrew
安装的git
$ brew link git --overwrite Warning: Already linked: /usr/local/Cellar/git/2.20.1 To relink: brew unlink git && brew link git
link 成功后,退出终端后,再次打开。然后查看
git
指向和版本信息。可以看到,我们的
git
版本已经升级到最新版了。Beta Was this translation helpful? Give feedback.
All reactions