hasen's tech life

Twitter: @hasen

OSX(Mavericks)のGitのバージョンアップをする.

# OSX(Mavericks)のGitのバージョンアップをすることに.
# 結果的には
$ brew install git

# 経緯
$ heroku login
Your version of git is 1.9.3. Which has serious security vulnerabilities.
More information here: https://blog.heroku.com/archives/2014/12/23/update_your_git_clients_on_windows_and_os_x
Enter your Heroku credentials.

# gitのバージョンアップを促されたので,gitのアップデートをすることに.
$ git --version
git version 1.9.3 (Apple Git-50)

# ダウンロード
Git
# 失敗
$ /Volumes/Git\ 2.2.1\ Mavericks\ Intel\ Universal/uninstall.sh
Git doesn't appear to be installed via this installer. Aborting

# シェルの中身を確認(失敗してから見るっていう...)
$ vi /Volumes/Git\ 2.2.1\ Mavericks\ Intel\ Universal/uninstall.sh
++ #!/bin/bash
++ if [ ! -r "/usr/local/git" ]; then
++ echo "Git doesn't appear to be installed via this installer. Aborting"
++ exit 1
++ fi
(以下省略)

# これまで使っていたのはlocalに入れたgitではなかった.
$ which git
/usr/bin/git

# 結果的に
$ brew install git
$ which git
/usr/local/bin/git
$ git --version
git version 2.2.2