【Mac】Gitバージョンアップ
2178 ワード
ほらを吹くことはありませんが、この文章は絶対に現在のネット上で最も簡単な
取付
次のコードを端末にコピーして、車に戻るをクリックして、おやつを開けて、食べながら待つといいです.
アップグレードインストール最新版の は、デフォルトの
タイトル:【Mac】Gitバージョンアップ
author: zhangpeng
date: 2019.01.16
GitHub: github.com/fullstack-z…
転載先:https://juejin.im/post/5c3e9de86fb9a049b5071413
Git
アップグレードチュートリアルです.取付
Homebrew
Homebrewはパッケージマネージャです.その役割は、パッケージを自分のディレクトリにインストールし、ファイルシンボルを/usr/local
にリンクすることです.詳細については、自分で公式サイトにアクセスしてください.次のコードを端末にコピーして、車に戻るをクリックして、おやつを開けて、食べながら待つといいです.
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
アップグレード
git
git
brew install git
次の出力が表示されると、git
のインストールが完了したことを示します:Already downloaded: /Users/zhangpeng/Library/Caches/Homebrew/downloads/c5f94c257b885992f680bbe3c2b8ec009e8856aefebac2cc1fb6608d7f006152--git-2.20.1.mojave.bottle.2.tar.gz
==> Pouring git-2.20.1.mojave.bottle.2.tar.gz
==> Caveats
Bash completion has been installed to:
/usr/local/etc/bash_completion.d
zsh completions and functions have been installed to:
/usr/local/share/zsh/site-functions
Emacs Lisp files have been installed to:
/usr/local/share/emacs/site-lisp/git
==> Summary
? /usr/local/Cellar/git/2.20.1: 1,528 files, 41.3MB
git
を変更し、端末内で私たちのgit
の指向とバージョン情報を表示することを指します.➜ ~ which git
/usr/bin/git
➜ ~ git --version
git version 2.17.2 (Apple Git-113)
次に、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
の指示およびバージョン情報を表示します.➜ ~ which git
/usr/local/bin/git
➜ ~ git --version
git version 2.20.1
では、git
バージョンが最新版にアップグレードされていることがわかります.タイトル:【Mac】Gitバージョンアップ
author: zhangpeng
date: 2019.01.16
GitHub: github.com/fullstack-z…
転載先:https://juejin.im/post/5c3e9de86fb9a049b5071413