From:http://itekblog.com/update-git-centos/
1、下载RPMForge repo
cd /tmp # for 32 bit: wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.i686.rpm # for 64 bit: wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
Note:访问这里查看是否有更新的版本。
2、安装RPMForge
rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt # for 32 bit: rpm -i rpmforge-release-0.5.3-1.el6.rf.i686.rpm # for 64 bit: rpm -i rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
3、编辑/etc/yum.repos.d/rpmforge.repo文件,修改[rpmforge-extras]选项中的enables,设置其值为1
yum clean all vim /etc/yum.repos.d/rpmforge.repo [rpmforge-extras] enabled=1 [rpmforge-extras].
4、更新Git
yum update git
5、查看Git版本
git --version
显示安装的新版本号。
更新完成!