Installing an updated version of git on RHEL7

Go to this url and get the name of the latest release.

Install dependencies:

yum check-updates
sudo yum install xmlto asciidoc curl-devel expat-devel gettext-devel openssl-devel zlib-devel

Get the git source:

mkdir git
cd git
curl | tar xz --strip-components=1

Note: change the version in the url with the one you want to install.

Compile and install it:

make all doc
sudo make prefix=/usr/local install install-doc

Also, if you want, you can enable colors for the git terminal output:

git config --global color.ui true