How to upgrade git 1.9.5 to 2.16.0?

How to upgrade git 1.9.5 to 2.16.0?
0.0 0

#1

I already have git version 1.9.5 installed on the machine and I need to upgrade to 2.16.0. However, after installation and I ran command git version and I am seeing version 1.8.3.1.

Can somebody please help me fixed this issue?


#2

Based on git help -a it looks like it’s either git update or git update-git-for-windows.


#3

If you have homebrew, you can

brew upgrade git 

// or just upgrade all your packages
brew upgrade

BTW, 2.17.0 is latest


#4

The system is OS RHEL 6


#5

I’d probably just compile from source for this case tbh, RHEL usually (and by design for stability reasons) keeps older versions in the repos.

You could add another repo instead: https://ius.io/#how-to-use

Otherwise to compile from source you can simply call git clone https://github.com/git/git
then cd into the git directory.

Be sure to read the INSTALL file for information about using make for the build before proceeding.

You also might be missing some build dependencies, install them with yum or whatever RHEL6’s package manager is.