Git Flow Shaokun Wu [email_address]
Why Git? <ul><li>随意的分支  (Branch)  与合并  (Merge) </li></ul><ul><li>分布式的、本地的代码库  (Repository) </li></ul><ul><li>快捷、轻量 </li></...
问题呢? <ul><li>把  Git  当  SVN  用,在  master  分支开发 </li></ul><ul><li>依然避免  Branch/Merge </li></ul><ul><li>任意的工作流程,让人无从下手 </li>...
Git Flow - by nvie 一种值得参考的工作流程
 
主分支 master, develop
master, develop  分支 <ul><li>用途: </li></ul><ul><ul><li>master HEAD -  正式版 </li></ul></ul><ul><ul><li>develop HEAD -  最新的开发版...
辅助分支 feature, release, hotfix
feature  分支 <ul><li>必须遵循: </li></ul><ul><ul><li>从  develop  分支 </li></ul></ul><ul><ul><li>合并回  develop </li></ul></ul><ul>...
 
release  分支 <ul><li>必须遵循: </li></ul><ul><ul><li>从  develop  分支 </li></ul></ul><ul><ul><li>合并回  develop, master </li></ul><...
hotfix  分支 <ul><li>必须遵循: </li></ul><ul><ul><li>从  master  分支 </li></ul></ul><ul><ul><li>合并回  develop, master </li></ul></u...
gitflow
$ git flow init No branches exist yet. Base branches must be created now. Branch name for production releases: [master]  B...
$ 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
<ul><li>A successful Git branching model </li></ul><ul><ul><li>http://nvie.com/git-model </li></ul></ul><ul><li>Why aren’t...
Upcoming SlideShare
Loading in...5
×

Git flow

2,865

Published on

珠三角技术沙龙-8月份

0 Comments
8 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,865
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
75
Comments
0
Likes
8
Embeds 0
No embeds

No notes for slide

Transcript of "Git flow"

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

    Clipping is a handy way to collect important slides you want to go back to later.

×