Update git from to 2.22.0


I have git on my CentOS 6 server, but it’s the version and I want to have the latest version (2.22.0).

I did not find any clear guide, I turn to you to know if my future method of update is viable.
I currently have several repositories, I understand that the command “git clone https://github.com/git/git” would allow me to update git, or is there any other manipulation?
I would like to keep my current configuration and my repositories. I’m just trying to get the latest version of git without impacting my current system.

Are there any big changes between my version and the last one?
Thanks for your help.

git clone [https://github.com/git/git](https://github.com/git/git) will get you the source code for Git, but it won’t be anything that you can execute on your machine. You would have to build Git from source in order for that to happen.

From what I understand, CentOS uses the yum package manager. So you may want to check the instructions for how to use yum to upgrade the software installed on your CentOS machine.

And you can check the Git release notes for the things that have changed between v1.8.3.1 (released ~6 years ago) and v2.22.0. For the most part, you probably won’t notice many large differences. Some commands have improved. Some performance has been improved. But the latest version of git will work on your old repositories with no issue and no extra steps needed.

I hope that helps!

1 Like

Hello lee-dohm,
Thanks a lot for your help! Indeed CentOS allows the update by the way of yum directly, I did not know it.

(# sudo yum update git)
Thanks for the information about the changes since 6 years ahah!
Have a nice day!