git flow使用

安裝git flow

Windows

配合Cygwin使用。Cygwin之下的安裝非常簡單。執行如下指令即可:

wget -q -O - --no-check-certificate 

https://github.com/nvie/gitflow/raw/develop/contrib/gitflow-installer.sh | bash

如果沒有安裝cygwin,先安裝=>cygwin使用方法

代碼示例

---------------------------------------------------------

使用gitflow

1.初始化
打開git-bash,進入項目文件目錄,輸入git flow init
2.開始一個新feature(feature1)
git flow feature start feature1
3.Publish一個Feature(進行修改後,提交到遠程,即push)
git flow feature publish feature1
4.獲取Publish的Feature(切到develop分支,將feature內容合併到develop)
git flow feature pull origin feature1
5.完成一個Feature
git flow feature finish feature1
6.開始一個Release
git flow release start "1.0.0"
7.Publish一個Release

git flow release publish "1.0.0"

8.發佈Release
git flow release finish "1.0.0"
查看版本tag
git tags
1.0.0

更新到遠程倉庫
$ git push origin develop
$ git checkout master
$ git push origin master
push 標籤信息
$ git push --tags

9.開始一個Hotfix
git flow hotfix start VERSION
10.發佈一個Hotfix
git flow hotfix finish VERSION






gitflow模型介紹

gitflow使用參考


















發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章