2011年6月10日金曜日

Gitのインストール

Gitのインストール
Linux環境にインストール

バイナリーパッケージをインストール

Linuxにインストールするならyumコマンドを使ってインストールするのが手っ取り早い。
以下のようにコンソールからコマンドを入力して実行すれば自動的にインストールを行ってくれる。
$ sudo yum install git

RPMやdebなどのパッケージファイルが欲しい人は以下のURLからダウンロードすることができる。

RPMhttp://kernel.org/pub/software/scm/git/RPMS/
DebStable:http://www.backports.org/debian/pool/main/g/git-core/
Testing:http://packages.debian.org/testing/devel/git-core
Unstable:http://packages.debian.org/unstable/devel/git-core

ソースからビルド

http://kernel.org/pub/software/scm/git/

$ wget http://kernel.org/pub/software/scm/git/git-1.7.5.tar.gz
$ tar -zxf git-1.7.5.tar.gz
$ cd git-1.7.5
$ ./configure --prefix=/user/local
$ make install 

マニュアルもインストールするなら
$ weget http://kernel.org/pub/software/scm/git/git-manpages-1.7.5.tar.gz
$ tar -zxf git-manpages-1.7.5.tar.gz
$ cp -r man1/ user/local/man/
$ cp -r man5/ user/local/man/
$ cp -r man7/ user/local/man/

Mac環境にインストール
Macの場合は、google codeにgit-osx-installerというのが公開されているのでそこからdmgファイルをダウンロード
http://code.google.com/p/git-osx-installer/downloads/list

Windows環境にインストール

Windowsには、CygwinベースのものととMinGWベースのMsysGitの2つの種類のバイナリーがある。
どちらも、基本的には出来ることは同じなのだが、TortoiseGitなどのツールはMsysGitをサポートすることが多いのであえて勧めるならMsysGitかな。