Install git 2.x on CentOS 6/7

Nguyễn Tuấn Phúc
1 min readMay 24, 2019

By default, even CentOS 7 comes with git v1.7.1 — to install git 2.x we need other git repository

  1. use WANDisco’s git repository 2.x for CentOS 6/7

with CentOS 6

yum install http://opensource.wandisco.com/centos/6/git/x86_64/wandisco-git-release-6-1.noarch.rpm

with CentOS 7.2 (replace 7–1 to install for 7.1)

yum install http://opensource.wandisco.com/centos/7/git/x86_64/wandisco-git-release-7-2.noarch.rpm

2. Install git

verify git repos version on current server

yum info git

The result like this

Available Packages
Name : git
Arch : x86_64
Version : 2.18.0
Release : 1.WANdisco.402
Size : 7.1 M
Repo : WANdisco-git/7/x86_64
Summary : Fast Version Control System
URL : http://www.wandisco.com
License : GPLv2
Description : Git is a fast, scalable, distributed revision control system with an unusually rich command set that provides both high-level operations and full access to internals.
The git rpm installs the core tools with minimal dependencies. To install all git packages, including tools for integrating with other. SCMs, install the git-all meta-package.

Ready to install

yum install git -y

Verify installed version

git --version

--

--