git官网使用yum安装只能到1.8版
git官网有提供两个解决方案
Red Hat Enterprise Linux, Oracle Linux, CentOS, Scientific Linux, et al.
RHEL and derivatives typically ship older versions of git. You can download a tarball and build from source, or use a 3rd-party repository such as the IUS Community Project to obtain a more recent version of git.
一种是通过源码构建安装,一种是走第三方软件源安装(即IUS社区项目)
使用自动脚本安装源
curl https://setup.ius.io | sh
# 搜索git,查看git安装软件名
yum search git

# 由上图可知,我们应该使用git236安装
yum remove -y git | yum -y install git236
# 安装后,查看git版本
git --version
# git version 2.36.1