Linux升级git
使用git提交代码时,由于版本太低会出现各种各样的问题,需要升级git版本。文章来源:http://blog.csdn.net/lunhui1994_/article/details/78689896安装需求:># yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel asciidoc&am
·
1.安装编译git时需要的包
# yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel
# yum install gcc perl-ExtUtils-MakeMaker
2.删除已有的git
# yum remove git
3.下载git源码,我自己下载的是2.0.0版本
# cd /usr/src # wget https://www.kernel.org/pub/software/scm/git/git-2.0.0.tar.gz # tar xzf git-2.0.0.tar.gz
4.编译安装(安装位置为/usr/local/)
# cd git-2.0.0 # make prefix=/usr/local/git all # make prefix=/usr/local/git install # echo "export PATH=$PATH:/usr/local/git/bin" >> ~/.bashrc # source ~/.bashrc
5.检查一下版本号
# git --version
更多推荐
已为社区贡献1条内容
所有评论(0)