Git branch management

1,954 views

Published on

A self-study note on the source code branch management using Git.

Published in: Technology
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,954
On SlideShare
0
From Embeds
0
Number of Embeds
11
Actions
Shares
0
Downloads
0
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

Git branch management

  1. 1. Git Branch Workflow
  2. 2. Practices ● Centralized Workflow ● Feature Branch Workflow ● Gitflow Workflow
  3. 3. Practices ● Centralized Workflow ● Feature Branch Workflow ● Gitflow Workflow
  4. 4. Centralized Workflow ● One master branch (or, trunk) ● Local repo v.s. Central repo master Feature-1 Feature-2
  5. 5. Practices ● Centralized Workflow ● Feature Branch Workflow ● Gitflow Workflow
  6. 6. Feature Branch Workflow ● Separate branches for feature development ● Merge back to master when feature ready Feature-1 “merge” master “merge” Feature-2
  7. 7. Practices ● Centralized Workflow ● Feature Branch Workflow ● Gitflow Workflow
  8. 8. Gitflow Workflow ● Designed for use with Git ○ with the power of branching ● Covers feature isolation, release control, and sustainability.
  9. 9. Branches ● ● ● ● ● Master Branch Development Branch Feature Branch (or “Topic” Branch) Release Branch Hotfix Branch (or “Maintenance” Branch)
  10. 10. Master Branch Master Dev. Branch Feature Branch Release Branch ● Stable ● HEAD is in production-ready state master v1.2 v1.2.1 v1.3 Hotfix Branch
  11. 11. Master Branch Development Branch Dev. Branch Feature Branch Release Branch ● Master -fork-> Development Branch ● Work in progress on ‘next release’ master development Hotfix Branch
  12. 12. Master Branch Feature Branch (1/2) Dev. Branch Feature Branch Release Branch ● Development -fork-> Feature ● Limited lifetime Hotfix Branch Feature-1 master development Feature-2
  13. 13. Master Branch Feature Branch (2/2) Dev. Branch Feature Branch Release Branch ● Feature -merge back-> Development Hotfix Branch Feature-1 master “merge” development “merge” Feature-2
  14. 14. Master Branch Release Branch (1/3) Dev. Branch Feature Branch Release Branch ● Development -fork-> Release ● Prepare for release Release Hotfix Branch Feature-1 master “merge” development “merge” Feature-2
  15. 15. Master Branch Release Branch (2/3) Dev. Branch Feature Branch Release Branch ● Release -merge back-> Master ● Version tagging Release Hotfix Branch Feature-1 “merge” v1.2 master “merge” development “merge” Feature-2
  16. 16. Master Branch Release Branch (3/3) Dev. Branch Feature Branch Release Branch ● Release -merge back-> Development Hotfix Branch Release Feature-1 “merge” v1.2 master “merge” development “merge” Feature-2
  17. 17. Master Branch Hotfix Branch (1/2) Dev Branch Feature Branch Release Branch ● Master -fork→ Maintenance (by tag) master v1.2 hotifx-1.2 development Hotfix Branch
  18. 18. Master Branch Hotfix Branch (2/2) Dev Branch Feature Branch Release Branch ● Master -fork→ Maintenance (by tag) master v1.2 v1.2.1 “merge” hotifx-1.2 “merge” development Hotfix Branch
  19. 19. Read More ● Atlassian: Git Workflows ● Git Branching Model from @nvie ● Pro Git Book

×