LoginSignup
8
9

More than 5 years have passed since last update.

Gitのアップデート方法

Posted at

MacOSでgitのアップデートしたときのメモ

・こちらからダウンロードし、画面に従ってインストールを行う
http://git-scm.com/download/mac

・バージョンをチェック
$ git --version

これで、バージョンが以前のままだったので、
どうやら、最新バージョンのPathの指定が毎回変わるみたいので、
gitの読み込み先Pathを変更しないとダメみたいです。

・Pathを指定してバージョンをチェック
/usr/local/git/bin/git --version

他の人は、こちらにインストールされていたという記事も見かけました
/usr/local/bin/git --version

・Pathを変更する
vim ~/.bash_profile

※追記

PATH=/usr/local/git/bin:$PATH
export PATH

・.bash_profile ファイルをロードし直す
$ source ~/.bash_profile

・バージョンをチェック
$ git --version

これで最新の状態になっていました。

8
9
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
9