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

相關文章
相關標籤/搜索