Mac OS X 開発環境構築手順:Gitインストール

MacにおけるGit環境のインストールにはHomebrewを用いましたが、あっけない程ちょ〜〜簡単でした。エントリにするまでも無いかもですが(笑)、一応記録として。

まずは以下の手順を元に、Homebrewをインストール。手間としてはJDKXcodeのインストールが事前に必要です。

あとは、以下のコマンド(brew install git)を実行するだけ。何とも簡単です。

$ brew search git
bagit		  git-diffall	    git-ftp	      git-multipush	git-ssh		  git-url-sub	    gitslave	      magit		willgit
git		  git-extras	    git-gerrit	      git-now		git-subtree	  git-utils	    legit	      stgit
git-cola	  git-flow	    git-hg	      git-sh		git-svn-abandon	  giter8	    libgit2	      topgit
shinyaa31-no-MacBook-Air:~ shinyaa31$ brew install git
==> Downloading http://git-core.googlecode.com/files/git-1.7.9.5.tar.gz
######################################################################## 100.0%
==> make prefix=/usr/local/Cellar/git/1.7.9.5 CC=/usr/bin/clang CFLAGS=-Os -w -pipe -march=native -Qunused-arguments LDFLAGS= install
==> Downloading http://git-core.googlecode.com/files/git-manpages-1.7.9.5.tar.gz
######################################################################## 100.0%
==> Downloading http://git-core.googlecode.com/files/git-htmldocs-1.7.9.5.tar.gz
######################################################################## 100.0%
==> Caveats
Bash completion has been installed to:
  /usr/local/etc/bash_completion.d

The 'contrib' directory has been installed to:
  /usr/local/share/git-core/contrib
Warning: Non-libraries were installed to "lib".
Installing non-libraries to "lib" is bad practice.
The offending files are:
/usr/local/Cellar/git/1.7.9.5/lib/Git.pm
==> Summary
/usr/local/Cellar/git/1.7.9.5: 1157 files, 23M, built in 41 seconds
$ 
  • Gitのインストール確認用にバージョンを確認。
$ git --version
git version 1.7.9.5