一、安装git所需的依赖
sudo yum groupinstall "Development Tools" sudo yum install gettext-devel openssl-devel perl-CPAN perl-devel zlib-devel二、去GitHub下载最新发布包 Git下载地址
wget https://github.com/git/git/archive/v2.1.2.tar.gz -O git.tar.gz三、解压源码包
tar -zxf git.tar.gz四、进到源码文件
cd git-*五、配置目标编译目录
make configure ./configure --prefix=/usr/local六、开始编译安装
sudo make install七、安装完成,检查版本号
git --version八、配置Git用户名及邮箱
git config --global user.name "Your Name" git config --global user.email "you@example.com"九、查看Git配置
git config --list user.name=Your Name user.email=you@example.com参考:https://www.digitalocean.com/community/tutorials/how-to-install-git-on-centos-7
后记:关于git clone: fatal: Unable to find remote helper for 'https'问题
解决方案:
1、系统中安装curl
yum install curl-devel 2、重新编译安装Git转载于:https://www.cnblogs.com/njl041x/p/6197244.html
相关资源:JAVA上百实例源码以及开源项目