First, you'll need to make sure you have all installed all the usual tools needed for compiling software from sources.
You can accomplish that with the following command:
yum groupinstall 'Development Tools'
Then, make sure you install dependencies that are specific to git:
yum install gettext-devel expat-devel curl-devel zlib-devel openssl-devel
Then, grab the latest source tarball with git's sources. Better go to the site but yourself and copy and paste the current link. If you just copy and paste my example you might end up installing and older version:
wget -c http://www.kernel.org/pub/software/scm/git/git-18.104.22.168.tar.bz2
Unpack the sources:
tar jxpf git-22.214.171.124.tar.bz2
Get into the folder, configure, compile and install:
cd git-126.96.36.199/ ./configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc --with-curl --with-expat make make install
Get rid of the folder. Perhaps keeping the tarball is fine, perhaps you can get rid of that too.
rm -Rf git-188.8.131.52/
And that's it. Now you can test the version of you shiny new git installation with this command:
You should obtain something like this as response:
git version 184.108.40.206