mac 初期設定 part4 - Gitをインストール

続いて、HomebrewでGitをインストールします。

 

ターミナルで

$ brew install git

と入力。

==> Summary
🍺  /usr/local/Cellar/git/1.8.5.3: 1335 files, 29M

 と表示されて完了。らくちんですね。

 

 

で、ターミナルで

$ brew doctor

して、

Warning: /usr/bin occurs before /usr/local/bin
This means that system-provided programs will be used instead of those
provided by Homebrew. The following tools exist at both paths:

    git
    git-cvsserver
    git-receive-pack
    git-shell
    git-upload-archive
    git-upload-pack

Consider setting your PATH so that /usr/local/bin
occurs before /usr/bin. Here is a one-liner:
    echo export PATH='/usr/local/bin:$PATH' >> ~/.bash_profile

と表示されるので、

 $ echo export PATH='/usr/local/bin:$PATH' >> ~/.bash_profile

と入力して、さらに

$ source .bash_profile

で有効化します。

 

最後にもう一度

$ brew doctor

して異常なければ完了です!

 

ついでに「SourceTree(Git/Hg)」を App Store からインストールしておきましょう。