# Wrong:
yum install git
===============================================================================================================================================================================================================================================================================
Package Arch Version Repository Size
===============================================================================================================================================================================================================================================================================
Updating:
git x86_64 1.7.1-9.el6_9 base 4.6 M
Updating for dependencies:
perl-Git noarch 1.7.1-9.el6_9 base 29 k
Transaction Summary
===============================================================================================================================================================================================================================================================================
Upgrade 2 Package(s)
Total download size: 4.6 M
As you can see it offers 1.7 and not 2.X
# Let us remove this version:
yum -y remove git
# Add IUS yum repository
yum -y install https://centos7.iuscommunity.org/ius-release.rpm
# Install latest GIT
yum -y install git2u-all
# Test
git --version
git version 2.16.5