linux系统安装git
# 使用包管理器安装
# 红帽系列
# yum install git -y
# ubuntu
# apt-get install git
# linux centos7.4
# 源码编译安装
# 安装依赖
yum install gcc gcc-c++ curl-devel expat-devel gettext-devel openssl-devel perl-devel zlib-devel
# 获取源码
wget -c https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.9.5.tar.gz
# 解压
tar zxvf git-2.9.5.tar.gz cd git-2.9.5/
# 生成配置
make configure
# 配置
./configure --prefix=/usr/local/git-2.9.5
# 编译安装
make && make install
# 查看版本
git version
#
![](https://i-blog.csdnimg.cn/blog_migrate/3c249ad8b3a76c31025afc373607d070.png)
linux上git配置高亮显示当前分支 : https://blog.csdn.net/dong_alex/article/details/80676610
/END