操作系统:Ubuntu 14.04.1 LTS x64
首先下载git源码包
https://www.kernel.org/pub/software/scm/git/
这里选择最新的2.2.1
一:安装git
1 : 先安装curl-devel
2 :
解压之后,进入源码包路径
依次执行
make configure
./configure --prefix=/usr/local/git
make all
sudo make install
最后,配置环境变量
git version
git version 2.2.1
二:安装git flow
安装文档:https://github.com/nvie/gitflow/wiki/Linux
依次执行
export INSTALL_PREFIX=/usr/local/git/bin
curl -OL https://raw.github.com/nvie/gitflow/develop/contrib/gitflow-installer.sh
chmod +x gitflow-installer.sh
sudo ./gitflow-installer.sh