SlideShare a Scribd company logo
Git Flow Shaokun Wu [email_address]
Why Git? 随意的分支  (Branch)  与合并  (Merge) 分布式的、本地的代码库  (Repository) 快捷、轻量 任意的工作流程 GitHub …
问题呢? 把  Git  当  SVN  用,在  master  分支开发 依然避免  Branch/Merge 任意的工作流程,让人无从下手 依旧习惯集中式版本控制的思维 …
Git Flow - by nvie 一种值得参考的工作流程
 
主分支 master, develop
master, develop  分支 用途: master HEAD -  正式版 develop HEAD -  最新的开发版 当  develop  足够稳定时候,将合并到  master ,并且  tag  上发布版本号 存在周期: 永远存在
辅助分支 feature, release, hotfix
feature  分支 必须遵循: 从  develop  分支 合并回  develop 任意命名,除了  master, develop, release-*, hotfix-* 用途: 用于开发新的功能特性  (feature) 存在周期: 合并到  develop  后删除
 
release  分支 必须遵循: 从  develop  分支 合并回  develop, master 命名为  release-* 用途: 为最终正式版做准备 提交  (commit)  小的  bug fix 存在周期: 合并到  develop  后删除
hotfix  分支 必须遵循: 从  master  分支 合并回  develop, master 命名为  hotfix-* 用途: 同样为最终正式版做准备 提交  (commit)  小的  bug fix 正式版发生重大的错误,必须立刻修复 存在周期: 合并到  develop/release  后删除
gitflow
$ git flow init No branches exist yet. Base branches must be created now. Branch name for production releases: [master]  Branch name for "next release" development: [develop]  How to name your supporting branch prefixes? Feature branches? [feature/]  Release branches? [release/]  Hotfix branches? [hotfix/]  Support branches? [support/]  Version tag prefix? []
$ git flow feature start login $ git flow feature finish login
$ git flow release start v0.1.0 $ git flow release finish v0.1.0
git-flow-completion Bash, Zsh
A successful Git branching model http://nvie.com/git-model Why aren’t you using git-flow? http://jeffkreeftmeijer.com/2010/why-arent-you-using-git-flow/ http://github.com/nvie/gitflow http:// github.com/bobthecow/git -flow-completion
Ad

Recommended

Qurbani aurzul hijja ke masail
Qurbani aurzul hijja ke masail
Shahzad Ahmad
 
WebSocket 实时推特流
WebSocket 实时推特流
shaokun
 
VIM for the PHP Developer
VIM for the PHP Developer
John Congdon
 
iOS 图片浏览器 DIY
iOS 图片浏览器 DIY
shaokun
 
Rest Ruby On Rails
Rest Ruby On Rails
shaokun
 
Rack
Rack
shaokun
 
Rails web api 开发
Rails web api 开发
shaokun
 
More to RoC weibo
More to RoC weibo
shaokun
 
Git in a nutshell
Git in a nutshell
Nelson Tai
 
Git & git flow
Git & git flow
Amo Wu
 
Git 入门实战
Git 入门实战
icy leaf
 
Git 版本控制系統 -- 從微觀到宏觀
Git 版本控制系統 -- 從微觀到宏觀
Wen-Tien Chang
 
Use Git-flow Manage Your Git Workflow
Use Git-flow Manage Your Git Workflow
Liangjun Jiang
 
Git Essence Tutorial
Git Essence Tutorial
Ho Kim
 
Git 程式碼版本控制軟體介紹
Git 程式碼版本控制軟體介紹
PingLun Liao
 
GIT實務操作與理論
GIT實務操作與理論
鵬 大
 
Git
Git
Min Micro
 
Introduction to git
Introduction to git
Bo-Yi Wu
 
Git+使用教程
Git+使用教程
gemron
 
Git and git hub
Git and git hub
唯 李
 
Version control0221
Version control0221
jianhongciou
 
Git 經驗分享
Git 經驗分享
Mu Chun Wang
 
Git flow 與團隊合作
Git flow 與團隊合作
Bo-Yi Wu
 
Git share
Git share
mactanxin
 
Intro to Git 投影片
Intro to Git 投影片
Tony Yeh
 
Git簡報
Git簡報
Ted Liang
 
Github简介及实用入门
Github简介及实用入门
Rongxing Liu
 
工程師必備第一工具 - Git
工程師必備第一工具 - Git
Alan Tsai
 

More Related Content

Similar to Git flow (20)

Git in a nutshell
Git in a nutshell
Nelson Tai
 
Git & git flow
Git & git flow
Amo Wu
 
Git 入门实战
Git 入门实战
icy leaf
 
Git 版本控制系統 -- 從微觀到宏觀
Git 版本控制系統 -- 從微觀到宏觀
Wen-Tien Chang
 
Use Git-flow Manage Your Git Workflow
Use Git-flow Manage Your Git Workflow
Liangjun Jiang
 
Git Essence Tutorial
Git Essence Tutorial
Ho Kim
 
Git 程式碼版本控制軟體介紹
Git 程式碼版本控制軟體介紹
PingLun Liao
 
GIT實務操作與理論
GIT實務操作與理論
鵬 大
 
Git
Git
Min Micro
 
Introduction to git
Introduction to git
Bo-Yi Wu
 
Git+使用教程
Git+使用教程
gemron
 
Git and git hub
Git and git hub
唯 李
 
Version control0221
Version control0221
jianhongciou
 
Git 經驗分享
Git 經驗分享
Mu Chun Wang
 
Git flow 與團隊合作
Git flow 與團隊合作
Bo-Yi Wu
 
Git share
Git share
mactanxin
 
Intro to Git 投影片
Intro to Git 投影片
Tony Yeh
 
Git簡報
Git簡報
Ted Liang
 
Github简介及实用入门
Github简介及实用入门
Rongxing Liu
 
工程師必備第一工具 - Git
工程師必備第一工具 - Git
Alan Tsai
 
Git in a nutshell
Git in a nutshell
Nelson Tai
 
Git & git flow
Git & git flow
Amo Wu
 
Git 入门实战
Git 入门实战
icy leaf
 
Git 版本控制系統 -- 從微觀到宏觀
Git 版本控制系統 -- 從微觀到宏觀
Wen-Tien Chang
 
Use Git-flow Manage Your Git Workflow
Use Git-flow Manage Your Git Workflow
Liangjun Jiang
 
Git Essence Tutorial
Git Essence Tutorial
Ho Kim
 
Git 程式碼版本控制軟體介紹
Git 程式碼版本控制軟體介紹
PingLun Liao
 
GIT實務操作與理論
GIT實務操作與理論
鵬 大
 
Introduction to git
Introduction to git
Bo-Yi Wu
 
Git+使用教程
Git+使用教程
gemron
 
Git and git hub
Git and git hub
唯 李
 
Version control0221
Version control0221
jianhongciou
 
Git flow 與團隊合作
Git flow 與團隊合作
Bo-Yi Wu
 
Intro to Git 投影片
Intro to Git 投影片
Tony Yeh
 
Github简介及实用入门
Github简介及实用入门
Rongxing Liu
 
工程師必備第一工具 - Git
工程師必備第一工具 - Git
Alan Tsai
 

Git flow

  • 1. Git Flow Shaokun Wu [email_address]
  • 2. Why Git? 随意的分支 (Branch) 与合并 (Merge) 分布式的、本地的代码库 (Repository) 快捷、轻量 任意的工作流程 GitHub …
  • 3. 问题呢? 把 Git 当 SVN 用,在 master 分支开发 依然避免 Branch/Merge 任意的工作流程,让人无从下手 依旧习惯集中式版本控制的思维 …
  • 4. Git Flow - by nvie 一种值得参考的工作流程
  • 5.  
  • 7. master, develop 分支 用途: master HEAD - 正式版 develop HEAD - 最新的开发版 当 develop 足够稳定时候,将合并到 master ,并且 tag 上发布版本号 存在周期: 永远存在
  • 9. feature 分支 必须遵循: 从 develop 分支 合并回 develop 任意命名,除了 master, develop, release-*, hotfix-* 用途: 用于开发新的功能特性 (feature) 存在周期: 合并到 develop 后删除
  • 10.  
  • 11. release 分支 必须遵循: 从 develop 分支 合并回 develop, master 命名为 release-* 用途: 为最终正式版做准备 提交 (commit) 小的 bug fix 存在周期: 合并到 develop 后删除
  • 12. hotfix 分支 必须遵循: 从 master 分支 合并回 develop, master 命名为 hotfix-* 用途: 同样为最终正式版做准备 提交 (commit) 小的 bug fix 正式版发生重大的错误,必须立刻修复 存在周期: 合并到 develop/release 后删除
  • 14. $ git flow init No branches exist yet. Base branches must be created now. Branch name for production releases: [master] Branch name for "next release" development: [develop] How to name your supporting branch prefixes? Feature branches? [feature/] Release branches? [release/] Hotfix branches? [hotfix/] Support branches? [support/] Version tag prefix? []
  • 15. $ git flow feature start login $ git flow feature finish login
  • 16. $ git flow release start v0.1.0 $ git flow release finish v0.1.0
  • 18. A successful Git branching model http://nvie.com/git-model Why aren’t you using git-flow? http://jeffkreeftmeijer.com/2010/why-arent-you-using-git-flow/ http://github.com/nvie/gitflow http:// github.com/bobthecow/git -flow-completion