Posted on

Update Git On CentOS 6.3

As of this writing, CentOS 6.3 has a default git version of 1.7.1-2.  This version is what you will have installed if you run the typical install command:

# yum install git

However, GitHub and many other services require git version 1.7.10 or higher. It turns out there is a very easy way to get git.  You need to do this from a privileged account, but then the process is simple.

Add RPM Forge to Yum Repos

# wget ''

# rpm --import

# rpm -i ''

# yum clean all

Install New Version from RPM Forge

# cd /etc/yum.repos.d
# vim (or whatever) rpmforge.repo

change the enabled=0 flag to enabled=1 in the section labelled [rpmforge-extras].

# yum  update
# yum provides git

This will return a longer list of available git modules.

Install the newer git by copying the FULL REPO NAME.   For example:

# yum install git- 
# git --version

You should have the new release installed.

Now go back and edit rpmforge.repo and disable the rpmforge-extras repository.  Then ensure the yum directory is cleaned up.

# yum update