With the Drupal.org Git Migration just around the corner, more than a few Drupal community members are going to need to get Git installed on their Red Hat or CentOS server. Even though Git isn't included by default, there's an easy way to install it from the EPEL (Extra Packages for Enterprise Linux) repository.
To do so, just type the following commands (assuming you're using RHEL 5.x or CentOS 5.x):
su -c 'rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm'
su -c 'yum install git'
The first line installs the EPEL repo details on your local system. The second line actually installs Git.
That's all there is to it!