首页 > 系统服务 > 详细

linux 源码安装最新git

时间:2015-02-15 11:55:24      阅读:261      评论:0      收藏:0      [点我收藏+]

1、如果系统中有旧的git 跳过第一步,否则先安装

$ sudo apt-get install git -core

2、下载最新git

$ git clone git://git.kernel.org/pub/scm/git/git.git 

3、进入git目录并查看最新的版本

$ cd git
$ git tag

当前最新版为

技术分享

 
4、将最新版本checkout

$ git checkout -b v2.2.1

5、将旧版本的git删除

$ sudo apt-get autoremove git

6、编译并安装最新git至指定目录

$ sudo make prefix=/usr/local all
$ sudo make prefix=/usr/local install

7、下载git man手册

$ git clone https://git.kernel.org/pub/scm/git/git-manpages.git


8、安装man手册

$ cd git-manpages/
$ sudo cp -a ./ /usr/local/man


9、查看版本信息

$ git --version
技术分享

linux 源码安装最新git

原文:http://www.cnblogs.com/aqing1987/p/4292582.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!