arch linux -- git flow
window
$ wget -q -O - --no-check-certificate https://github.com/nvie/gitflow/raw/develop/contrib/gitflow-installer.sh | bash
這里你需要wget 和 util-linux
Ubuntu
apt-get install git-flow
other linux
$ curl -OL https://raw.github.com/nvie/gitflow/develop/contrib/gitflow-installer.sh
$ chmod +x gitflow-installer.sh
$ sudo ./gitflow-installer.sh
git flow 使用
git flow 初始化
git flow init
開發(fā)新特性
git flow feature start MYFEATURE
它會創(chuàng)建一個分支feature/demo,并切換到該分支咬清。
當功能完成時
git flow feature finish demo
它會有feature/demo分支合并到develop分支,然后切換回develop分支,并刪除feature/demo分支。
git flow release start v0.7.0
它會創(chuàng)建一個release/v0.7.0分支掷倔,并切換到該分支善榛。
然后在這里進行測試。如果測試沒問題凑术,則執(zhí)行以下命令:
git flow release finish v0.7.0
它會將release/v0.7.0分支的內(nèi)容合并到master分支和develop分支,并且打上tag v0.7.0所意,然后刪除release/v0.7.0分支淮逊。
修復bug
git flow hotfix start 3
它會創(chuàng)建一個基于master的分支hotfix/3,并切換到當前分支扶踊。
當修復完成后泄鹏,可以執(zhí)行以下命令:
git flow notfix finish 3