SlideShare a Scribd company logo
1 of 20
GIT
&
Branching Model
Author:
TU Tran
Skype: tranthanhtu83
Email: contact@tranthanhtu.vn
Blog: http://tranthanhtu.vn
- Overview about GIT
- Perform basic action on GIT (window)
- Perform basic action on SourceTree
- Branching Model
Scope
TU Tran(skype: tranthanhtu83, mail: contact@tranthanhtu.vn)
- GIT: https://git-scm.com/
- GIT UI on Window : https://tortoisegit.org/
- SourceTree: https://www.sourcetreeapp.com/
- Reference: http://www.tranthanhtu.vn/post/2017/01/11/git-branching-
model
Resource
TU Tran(skype: tranthanhtu83, mail: contact@tranthanhtu.vn)
 Overview
 DVCS vs CVCS
 GIT
 SourceTree
 Branching Model
Agenda
TU Tran(skype: tranthanhtu83, mail: contact@tranthanhtu.vn)
Overview
TU Tran(skype: tranthanhtu83, mail: contact@tranthanhtu.vn)
DVCS: Distributed Version Control System
Example: Git, Mercurial
CVCS: Centralized Version Control System
Example: CVS, Perforce, SVN
DVCS vs CVCS
TU Tran(skype: tranthanhtu83, mail: contact@tranthanhtu.vn)
CVCS: Centralized version control system
TU Tran(skype: tranthanhtu83, mail: contact@tranthanhtu.vn)
DVCS: Distributed version control system
TU Tran(skype: tranthanhtu83, mail: contact@tranthanhtu.vn)
- Install GIT on local
- Checkout code from remote
- Create + push Branch
- Merge Branch
- Resolve Conflict
- Ignore files
GIT
TU Tran(skype: tranthanhtu83, mail: contact@tranthanhtu.vn)
- Install GIT on local
- Checkout code from remote
- Create + push Branch
- Merge Branch
- Resolve Conflict
SourceTree
TU Tran(skype: tranthanhtu83, mail: contact@tranthanhtu.vn)
Branching Model
TU Tran(skype: tranthanhtu83, mail: contact@tranthanhtu.vn)
- Feature branch
- Release branch
- Tagging
- Hotfix
Branching Model
TU Tran(skype: tranthanhtu83, mail: contact@tranthanhtu.vn)
Branching Model/ Overview
TU Tran(skype: tranthanhtu83, mail: contact@tranthanhtu.vn)
- Scenario:
- Develop should not impact to others during implementing
their tasks/ features
- Solution:
- Create new branch from develop
- Implement your feature there
- Merge back to develop when completed
Branching Model/ Feature branch
TU Tran(skype: tranthanhtu83, mail: contact@tranthanhtu.vn)
- Scenario:
- Completed features need to be tested before delivering to
customer
- Other develops can continue on other features in parallel
- Solution:
- Create new branch from develop
- Test your complemented features and fix bugs
- Merge to master, develop branches when ready for new release
Branching Model/ Release branch
TU Tran(skype: tranthanhtu83, mail: contact@tranthanhtu.vn)
- Scenario:
- We found bugs on production need to be fixed SAP
- Solution:
- Create new branch from master
- Fix bugs and re-test on staging
- Merge to master, develop branches
Branching Model/ Hotfix branch
TU Tran(skype: tranthanhtu83, mail: contact@tranthanhtu.vn)
- Scenario:
- We need to maintain code of each version at the same time
- Solution:
- Create new tag when release new version to customer
Branching Model/ Tagging
TU Tran(skype: tranthanhtu83, mail: contact@tranthanhtu.vn)
Branching Model/ Review
TU Tran(skype: tranthanhtu83, mail: contact@tranthanhtu.vn)
Q&A
TU Tran(skype: tranthanhtu83, mail: contact@tranthanhtu.vn)
Thank For Watching
TU Tran(skype: tranthanhtu83, mail: contact@tranthanhtu.vn)

More Related Content

More from Tu Tran

Fullstack Part 2 - Angular
Fullstack Part 2 - AngularFullstack Part 2 - Angular
Fullstack Part 2 - AngularTu Tran
 
Rest & WebApi
Rest & WebApiRest & WebApi
Rest & WebApiTu Tran
 
Git & SourceTree
Git & SourceTreeGit & SourceTree
Git & SourceTreeTu Tran
 
Angular2 getstart
Angular2 getstartAngular2 getstart
Angular2 getstartTu Tran
 
DevOps in software development
DevOps in software developmentDevOps in software development
DevOps in software developmentTu Tran
 

More from Tu Tran (6)

Html
HtmlHtml
Html
 
Fullstack Part 2 - Angular
Fullstack Part 2 - AngularFullstack Part 2 - Angular
Fullstack Part 2 - Angular
 
Rest & WebApi
Rest & WebApiRest & WebApi
Rest & WebApi
 
Git & SourceTree
Git & SourceTreeGit & SourceTree
Git & SourceTree
 
Angular2 getstart
Angular2 getstartAngular2 getstart
Angular2 getstart
 
DevOps in software development
DevOps in software developmentDevOps in software development
DevOps in software development
 

Recently uploaded

Authentic No 1 Amil Baba In Pakistan Amil Baba In Faisalabad Amil Baba In Kar...
Authentic No 1 Amil Baba In Pakistan Amil Baba In Faisalabad Amil Baba In Kar...Authentic No 1 Amil Baba In Pakistan Amil Baba In Faisalabad Amil Baba In Kar...
Authentic No 1 Amil Baba In Pakistan Amil Baba In Faisalabad Amil Baba In Kar...Authentic No 1 Amil Baba In Pakistan
 
Inspiring Through Words Power of Inspiration.pptx
Inspiring Through Words Power of Inspiration.pptxInspiring Through Words Power of Inspiration.pptx
Inspiring Through Words Power of Inspiration.pptxShubham Rawat
 
西伦敦大学毕业证学位证成绩单-怎么样做
西伦敦大学毕业证学位证成绩单-怎么样做西伦敦大学毕业证学位证成绩单-怎么样做
西伦敦大学毕业证学位证成绩单-怎么样做j5bzwet6
 
(No.1)↠Young Call Girls in Sikanderpur (Gurgaon) ꧁❤ 9711911712 ❤꧂ Escorts
(No.1)↠Young Call Girls in Sikanderpur (Gurgaon) ꧁❤ 9711911712 ❤꧂ Escorts(No.1)↠Young Call Girls in Sikanderpur (Gurgaon) ꧁❤ 9711911712 ❤꧂ Escorts
(No.1)↠Young Call Girls in Sikanderpur (Gurgaon) ꧁❤ 9711911712 ❤꧂ EscortsDelhi Escorts Service
 
E J Waggoner against Kellogg's Pantheism 8.pptx
E J Waggoner against Kellogg's Pantheism 8.pptxE J Waggoner against Kellogg's Pantheism 8.pptx
E J Waggoner against Kellogg's Pantheism 8.pptxJackieSparrow3
 
南新罕布什尔大学毕业证学位证成绩单-学历认证
南新罕布什尔大学毕业证学位证成绩单-学历认证南新罕布什尔大学毕业证学位证成绩单-学历认证
南新罕布什尔大学毕业证学位证成绩单-学历认证kbdhl05e
 
(南达科他州立大学毕业证学位证成绩单-永久存档)
(南达科他州立大学毕业证学位证成绩单-永久存档)(南达科他州立大学毕业证学位证成绩单-永久存档)
(南达科他州立大学毕业证学位证成绩单-永久存档)oannq
 
Call Girls In Karkardooma 83770 87607 Just-Dial Escorts Service 24X7 Avilable
Call Girls In Karkardooma 83770 87607 Just-Dial Escorts Service 24X7 AvilableCall Girls In Karkardooma 83770 87607 Just-Dial Escorts Service 24X7 Avilable
Call Girls In Karkardooma 83770 87607 Just-Dial Escorts Service 24X7 Avilabledollysharma2066
 

Recently uploaded (9)

Authentic No 1 Amil Baba In Pakistan Amil Baba In Faisalabad Amil Baba In Kar...
Authentic No 1 Amil Baba In Pakistan Amil Baba In Faisalabad Amil Baba In Kar...Authentic No 1 Amil Baba In Pakistan Amil Baba In Faisalabad Amil Baba In Kar...
Authentic No 1 Amil Baba In Pakistan Amil Baba In Faisalabad Amil Baba In Kar...
 
Inspiring Through Words Power of Inspiration.pptx
Inspiring Through Words Power of Inspiration.pptxInspiring Through Words Power of Inspiration.pptx
Inspiring Through Words Power of Inspiration.pptx
 
西伦敦大学毕业证学位证成绩单-怎么样做
西伦敦大学毕业证学位证成绩单-怎么样做西伦敦大学毕业证学位证成绩单-怎么样做
西伦敦大学毕业证学位证成绩单-怎么样做
 
(No.1)↠Young Call Girls in Sikanderpur (Gurgaon) ꧁❤ 9711911712 ❤꧂ Escorts
(No.1)↠Young Call Girls in Sikanderpur (Gurgaon) ꧁❤ 9711911712 ❤꧂ Escorts(No.1)↠Young Call Girls in Sikanderpur (Gurgaon) ꧁❤ 9711911712 ❤꧂ Escorts
(No.1)↠Young Call Girls in Sikanderpur (Gurgaon) ꧁❤ 9711911712 ❤꧂ Escorts
 
E J Waggoner against Kellogg's Pantheism 8.pptx
E J Waggoner against Kellogg's Pantheism 8.pptxE J Waggoner against Kellogg's Pantheism 8.pptx
E J Waggoner against Kellogg's Pantheism 8.pptx
 
南新罕布什尔大学毕业证学位证成绩单-学历认证
南新罕布什尔大学毕业证学位证成绩单-学历认证南新罕布什尔大学毕业证学位证成绩单-学历认证
南新罕布什尔大学毕业证学位证成绩单-学历认证
 
Model Call Girl in Lado Sarai Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Lado Sarai Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Lado Sarai Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Lado Sarai Delhi reach out to us at 🔝9953056974🔝
 
(南达科他州立大学毕业证学位证成绩单-永久存档)
(南达科他州立大学毕业证学位证成绩单-永久存档)(南达科他州立大学毕业证学位证成绩单-永久存档)
(南达科他州立大学毕业证学位证成绩单-永久存档)
 
Call Girls In Karkardooma 83770 87607 Just-Dial Escorts Service 24X7 Avilable
Call Girls In Karkardooma 83770 87607 Just-Dial Escorts Service 24X7 AvilableCall Girls In Karkardooma 83770 87607 Just-Dial Escorts Service 24X7 Avilable
Call Girls In Karkardooma 83770 87607 Just-Dial Escorts Service 24X7 Avilable
 

Fullstack - Requiste - GIT & SourceTree

  • 1. GIT & Branching Model Author: TU Tran Skype: tranthanhtu83 Email: contact@tranthanhtu.vn Blog: http://tranthanhtu.vn
  • 2. - Overview about GIT - Perform basic action on GIT (window) - Perform basic action on SourceTree - Branching Model Scope TU Tran(skype: tranthanhtu83, mail: contact@tranthanhtu.vn)
  • 3. - GIT: https://git-scm.com/ - GIT UI on Window : https://tortoisegit.org/ - SourceTree: https://www.sourcetreeapp.com/ - Reference: http://www.tranthanhtu.vn/post/2017/01/11/git-branching- model Resource TU Tran(skype: tranthanhtu83, mail: contact@tranthanhtu.vn)
  • 4.  Overview  DVCS vs CVCS  GIT  SourceTree  Branching Model Agenda TU Tran(skype: tranthanhtu83, mail: contact@tranthanhtu.vn)
  • 5. Overview TU Tran(skype: tranthanhtu83, mail: contact@tranthanhtu.vn)
  • 6. DVCS: Distributed Version Control System Example: Git, Mercurial CVCS: Centralized Version Control System Example: CVS, Perforce, SVN DVCS vs CVCS TU Tran(skype: tranthanhtu83, mail: contact@tranthanhtu.vn)
  • 7. CVCS: Centralized version control system TU Tran(skype: tranthanhtu83, mail: contact@tranthanhtu.vn)
  • 8. DVCS: Distributed version control system TU Tran(skype: tranthanhtu83, mail: contact@tranthanhtu.vn)
  • 9. - Install GIT on local - Checkout code from remote - Create + push Branch - Merge Branch - Resolve Conflict - Ignore files GIT TU Tran(skype: tranthanhtu83, mail: contact@tranthanhtu.vn)
  • 10. - Install GIT on local - Checkout code from remote - Create + push Branch - Merge Branch - Resolve Conflict SourceTree TU Tran(skype: tranthanhtu83, mail: contact@tranthanhtu.vn)
  • 11. Branching Model TU Tran(skype: tranthanhtu83, mail: contact@tranthanhtu.vn)
  • 12. - Feature branch - Release branch - Tagging - Hotfix Branching Model TU Tran(skype: tranthanhtu83, mail: contact@tranthanhtu.vn)
  • 13. Branching Model/ Overview TU Tran(skype: tranthanhtu83, mail: contact@tranthanhtu.vn)
  • 14. - Scenario: - Develop should not impact to others during implementing their tasks/ features - Solution: - Create new branch from develop - Implement your feature there - Merge back to develop when completed Branching Model/ Feature branch TU Tran(skype: tranthanhtu83, mail: contact@tranthanhtu.vn)
  • 15. - Scenario: - Completed features need to be tested before delivering to customer - Other develops can continue on other features in parallel - Solution: - Create new branch from develop - Test your complemented features and fix bugs - Merge to master, develop branches when ready for new release Branching Model/ Release branch TU Tran(skype: tranthanhtu83, mail: contact@tranthanhtu.vn)
  • 16. - Scenario: - We found bugs on production need to be fixed SAP - Solution: - Create new branch from master - Fix bugs and re-test on staging - Merge to master, develop branches Branching Model/ Hotfix branch TU Tran(skype: tranthanhtu83, mail: contact@tranthanhtu.vn)
  • 17. - Scenario: - We need to maintain code of each version at the same time - Solution: - Create new tag when release new version to customer Branching Model/ Tagging TU Tran(skype: tranthanhtu83, mail: contact@tranthanhtu.vn)
  • 18. Branching Model/ Review TU Tran(skype: tranthanhtu83, mail: contact@tranthanhtu.vn)
  • 19. Q&A TU Tran(skype: tranthanhtu83, mail: contact@tranthanhtu.vn)
  • 20. Thank For Watching TU Tran(skype: tranthanhtu83, mail: contact@tranthanhtu.vn)

Editor's Notes

  1. Source control helps us share works between members 2 types: Centralized and distributed
  2. Easy to commit the mistake into central repo Can not work offline Commit unfinished feature into remote and break others in the team work on the same branch => Hard to co-operate with others
  3. Can work offline, commit local unfinished feature Push to remote only when finish the feature Rollback on local Avoid breaking others Fast: Commit, reverse, diff on local Which become common today and why?
  4. - Work on the same folder - New code from new branch will replace old code
  5. Gitflow tool Local vs remote Add more remote source
  6. Team have many members 1 members can break others by typo mistake It can be future feature, not release at the moment -> Each member need to have their own work space Delete feature branch when complete
  7. We should only have a few members working on this Explain why we need to merge back to develop Suitable for minor bugs Create new branch for big bugs? Or missing features???
  8. Issue found in old version of release , old tag?? If having release branch, merge to release branch instead of develop
  9. Can not change code of tag Update version of tag when do the hotfix Do hotfix on version 1.0, will we update to other release (2.0, …)
  10. Explain each and when we need it
  11. - Do we need to push feature branch to remote - How long should we merge from dev to feature