How to use the latest Git on CentOS 7

Hello,
I'm Mandai, the Wild Team member of the development team.
When I installed Visual Studio Code on CentOS 7, I got annoyed that the git version was out of date, so I installed the latest version.
git that can be installed using yum on CentOS 7 is 1.8.
Unfortunately, that's about it.
If you want a later version of git, the only way to do this currently seems to be to install it from source
It would be great if we could set up a repository server beyond these official repositories to cover the parts that are not covered and be of some use to the public
Putting that complaint aside (is that right?),
the libraries required for installing git can be installed with yum, so let's quickly get them all together.
yum install openssl-devel curl-devel expat-devel
The latest git source is available on github, so you can get it by git clone
As an aside, to compile git, you don't need to run ./configure (in fact, it doesn't exist), so if you start without reading the instructions carefully, you might be confused
The correct answer is, "Just make it right away."
make prefix=[/path/to/install] install [install-doc install-html] #install-doc etc. as you like
The prefix is the installation path,
such as /usr or /usr/local.
After entering the path, I just specified install and it proceeded to compile and install.
I thought it might have something to do with the documentation, so I installed it without it. This
was just to confirm that this kind of thing is possible.
Now we have the latest git environment
And they lived happily ever after
Wait a minute!
I found an interesting sentence on the official website's download page
Red Hat Enterprise Linux, Oracle Linux, CentOS, Scientific Linux, et al.
RHEL and derivatives typically ship older versions of git. If you cannot (or don't want to) compile git from source, you may need to use a 3rd-party repository such as the IUS Community Project to obtain a more recent version of git.
Hmmm...?
I have a bad feeling about this, so let's first check out this IUS
This may be a risky assumption, as it is an English page, but I believe this is a repository of the latest open source software compiled by volunteers.
(I've abbreviated it quite a bit.)
Packages - IUSI searched on this page and actually found it.
Since RPMs compiled for each part are installed, it seems that you actually need to collect the packages you need.
So, I will download the minimum package required to install 2.11.
wget https://dl.iuscommunity.org/pub/ius/stable/CentOS/7/x86_64/git2u-2.11.0-1.ius.centos7.x86_64.rpm wget https://dl.iuscommunity.org/pub/ius/stable/CentOS/7/x86_64/git2u-perl-Git-2.11.0-1.ius.centos7.noarch.rpm wget https://dl.iuscommunity.org/pub/ius/stable/CentOS/7/x86_64/git2u-core-2.11.0-1.ius.centos7.x86_64.rpm wget https://dl.iuscommunity.org/pub/ius/stable/CentOS/7/x86_64/git2u-core-doc-2.11.0-1.ius.centos7.x86_64.rpm sudo yum install git2u-perl-Git-2.11.0-1.ius.centos7.noarch.rpm git2u-2.11.0-1.ius.centos7.x86_64.rpm git2u-core-2.11.0-1.ius.centos7.x86_64.rpm git2u-core-doc-2.11.0-1.ius.centos7.x86_64.rpm
Run the downloaded rpms in yum
I was able to install it in no time!
Upon further investigation
It seems that you can register the repository published by IUS with yum.
This site explains it in detail, so if you're someone who likes the latest version of everything (like me), why not give it a try?
Add IUS to the yum repository for CentOS 7.1 64-bit | kakiro-web
When I searched for "latest version of git", every site said "you have to install from source", so I installed from source, but I need to do some more research
That's all
0