Ubuntu 14.04 安装git flow

ubuntu1404 默认的git版本是1.9,最新的git版本都已经到git2.12 了,为了更好的使用gitflow,咱们须要对git进行升级, 采用源码安装的方式进行覆盖安装git

https://github.com/git/git/tree/v2.12.0
#下载git 用命令行下载或者直接网页上下载均可以
wget https://github.com/git/git/archive/v2.12.0.zip
# 解压
unzip v2.12.0.zip

cd v2.12.0
#编译 安装
./configure

make 

make install

git --version

 

安装gitflowgithub

Git Flow的Github主页 有对应的帮助文档等信息,Ubuntu能够经过如下命令进行安装:ubuntu

$ sudo apt-get install git-flow

能够经过 git flow init 检查是否安装成功。bash

在个人Ubuntu 14.04上安装以后,使用git flow init 却出现 
Git flow command error: 'flow' is not a git command 的问题,google上说明:git-flow安装在 /usr/local/bin 目录下,并将该路径添加到 $PATH 里面去,但在个人 /usr/local/bin 路径下并无找到对应的安装文件夹,能够尝试源码安装:curl

$ curl -OL https://raw.github.com/nvie/gitflow/develop/contrib/gitflow-installer.sh
$ chmod +x gitflow-installer.sh
$ sudo ./gitflow-installer.sh

经过curl下载安装脚本gitflow-installer.sh,添加执行权限,安装便可。 
安装过程能够看到安装在 /usr/local/bin 下。最后安装完成google

相关文章
相关标签/搜索