Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. Git is easy to learn and has a tiny footprint with lightning fast performance. It outclasses SCM tools like Subversion, CVS, Perforce, and ClearCase with features like cheap local branching, convenient staging areas, and multiple workflows.
This how to guide will help you to upgrade git version on your CentOS/RHEL 6 system.
Step 1: Install rpmforge Repository
Download and install rpmforge repository rpm using following commands.
RHEL/CentOS 6 - 64bit # rpm -i 'http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm' # rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt RHEL/CentOS 6 - 32bit # rpm -i 'http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.i686.rpm' # rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
Step 2: Edit rpmforge Yum Repository File
Edit your rpmforge repository file and change enabled=1 from 0 in [rpmforge-extras] section.
# vim /etc/yum.repos.d/rpmforge.repo
change the enabled=0 flag to enabled=1 and save it.
Step 3: Upgrade git Version
Upgrade git version on your system using following command and check the upgraded version.
# yum update git
Check git version
# git --version git version 188.8.131.52
Step 4: Finally disable rpmforge-extras Repo
Edit and disable rpmforge-extras repository in rpmforge.repo and clean the yum data.
# yum clean all
Visit here to get a free Git cheatsheet for quickly learn uses of git. You may also visit below link to learn Git with demo environment using virtual terminal