git flow 使用步骤
生活随笔
收集整理的這篇文章主要介紹了
git flow 使用步骤
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
?
?
?
?
Mac安裝git-flow:brew install git-flow
克隆新代碼:git clone git@gitlab.xxx.cn:abc/test.git
切換到遠程的develop分支(很重要):git checkout develop?(目的是為了和遠程的分支關聯起來)
?
使用 git-flow,從初始化一個現有的 git 庫內開始:
git flow init?
新分支的開發是基于 'develop' 分支的(這個操作創建了一個基于'develop'的特性分支,并切換到這個分支之下):
git flow feature start MYFEATURE?
發布新分支到遠程服務器:
git flow feature publish MYFEATURE?
完成開發新分支。這個動作執行下面的操作.
- 合并 MYFEATURE 分支到 'develop'
- 刪除這個新特性分支
- 切換回 'develop' 分支
?
pull操作就用基本的 git pull 或者 git pull origin develop 就行,也可以使用:
git flow feature pull origin MYFEATURE?
?
從 'develop' 分支開始創建一個 release 分支。
git flow release start RELEASE將release分支發布到遠程:
git flow release publish RELEASE完成 release 版本
完成 release 版本是一個大 git 分支操作。它執行下面幾個動作:
- 歸并 release 分支到 'master' 分支
- 用 release 分支名打 Tag
- 歸并 release 分支到 'develop'
- 移除 release 分支
?
【參考】https://danielkummer.github.io/git-flow-cheatsheet/index.zh_CN.html
?
轉載于:https://www.cnblogs.com/rxbook/p/10596367.html
創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎總結
以上是生活随笔為你收集整理的git flow 使用步骤的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 【译】2019年开始使用Typescri
- 下一篇: Rust 语法索引