0

When I install git on windows or Ubuntu, i get a recent version of git close to what is listed here:

https://github.com/git/git/releases

However, When I install git on a centos Linux, I get an older version of git:

yum check-update

yum install -y git

git --version

git version 1.8.3.1

version 1.8.3.1 is to old. I think I am missing something here.

Why do I get such old version of git on centos?

Allan Xu
  • 7,998
  • 11
  • 51
  • 122

1 Answers1

5

You have to first install the wandisco repository and then update git.

Use your centos version in the URL.

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

yum update git

Rahib Rasheed
  • 317
  • 1
  • 10
  • it worked, thank you. Do you know why it is not documented here: https://git-scm.com/download/linux – Allan Xu Jul 12 '21 at 17:49
  • 2
    While it's highly unlikely that a newer `git` will cause any trouble, there is a reason why things are older in CentOS - stability. Everything is built in harmony ensuring packages depending on each other work without any issues together. – Danila Vershinin Jul 12 '21 at 19:18