[root@bogon /]# mkdir software

[root@bogon /]# wget http://git-core.googlecode.com/files/git-1.8.3.4.tar.gz

[root@bogon software]# tar -xzvf git-1.8.3.4.tar.gz

[root@bogon software]# cd git-1.8.3.4

[root@bogon git-1.8.3.4]# yum -y install curl curl-devel zlib-devel openssl-devel perl cpio expat-devel gettext-devel perl-ExtUtils-MakeMaker

[root@bogon git-1.8.3.4]# ./configure --prefix=/usr/local/

[root@bogon git-1.8.3.4]# make && make install


Git《权威指南》一书中看到Git可以配置命令自动补齐功能,真不错,不过按照原书的操作说明,查看了一下,CentOS的etc目录下无bash_completion文件,故没有按照他写的方法操作,而是直接把git提供的bash脚本拷贝到用户的目录下就可以了,具体操作方法

cd git-1.7.7.4

cp contrib/completion/git-completion.bash ~/.git-completion.bash

vi ~/.bashrc

source ~/.git-completion.bash



二进制包安装

yum -y install git git-svn git-email git-gui gitk