找回密码
 立即注册
搜索
查看: 1561|回复: 1

Centos Git1.7.1升级到Git指定版本或者最新版本

[复制链接]

581

主题

110

回帖

4066

积分

管理员

积分
4066

众神之神

发表于 2016-8-5 14:28:56 | 显示全部楼层 |阅读模式
最新版本地址
  1. wget -O git-master.zip https://github.com/git/git/archive/master.zip

  2. unzip git-master.zip
  3. cd git-master
复制代码
已2.2.1版本为例子

卸载Centos自带的git1.7.1:
通过git –version查看系统带的版本,Cento6.5应该自带的是git版本是1.7.1
  1. yum remove git
复制代码
下载git2.2.1并将git添加到环境变量中
  1. wget https://github.com/git/git/archive/v2.2.1.tar.gz
  2. tar zxvf v2.2.1.tar.gz
  3. cd git-2.2.1
  4. make configure
  5. ./configure --prefix=/usr/local/git --with-iconv=/usr/local/libiconv
  6. make all doc
  7. make install install-doc install-html
  8. echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc
  9. source /etc/bashrc
复制代码


查看版本号
  1. git --version
复制代码


581

主题

110

回帖

4066

积分

管理员

积分
4066

众神之神

 楼主| 发表于 2016-8-5 14:30:45 | 显示全部楼层
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|十三博客 ( 鲁ICP备2023000528号 )

GMT+8, 2026-6-1 17:26 , Processed in 0.079749 second(s), 21 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表