Yum doesn't install latest version of Git on Centos6

Solution 1:

It's super easy to download the source and compile it yourself, I even found RPMForge method kind of cumbersome.

Download Git 2.11 source and

    make configure 
    ./configure --prefix=/usr
    make all
    sudo make install install-doc install-html

I needed to install a couple of dependencies before make fully succeeds.

sudo yum install libcurl-devel zlib-devel asciidoc xmlto

Solution 2:

Here's what worked for me:

  1. Enabled RPMForge
  2. yum install yum-plugin-priorities # install the yum priorities plugin via
  3. Enabled the RPM Forge Extras repo by editing /etc/yum.repos.d/rpmforge.repo and changed enabled to 1 in the rpmforge-extras section. I also bumped up the priority of both rpmforge repos to 1 by adding priority = 1 to both sections.
  4. yum remove git
  5. yum clean all && yum update && yum install git

Solution 3:

Your OS vendor (the CentOS project) may not have built a package for the latest version of git yet (or they may not be planning to, and instead intend to stick with the 1.7.x series in CentOS 6).

Software does not magically appear in packaging systems the day it's released by its author - packages need to be built, tested, approved, and pushed. If you require a version that your upstream vendor isn't shipping you can always build it yourself...