LoginSignup
54

More than 5 years have passed since last update.

OSX で Git をバージョンアップする

Last updated at Posted at 2013-08-26

アップデート前のバージョンは、

$ git --version
git version 1.7.9.6 (Apple Git-31.1)

・公式サイト http://git-scm.com/ に行き、"Download for Mac" のボタンから .dmg ファイルを
ダウンロードします。
・落ちてきた .dmg を開いて道なりにインストールします。
・実行ファイルのインストール先は /usr/local/git/bin になるようです。
もとの git は /usr/bin/git なので、新しいほうが優先されるように path を設定します。

$ vim ~/.bash_profile

編集箇所

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

.bash_profile ファイルをロードし直します

source ~/.bash_profile

バージョンを確認します

$ git --version
git version 1.8.3.2

→ OK.

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
54