NERDS — 28 May 2015 - · PDF fileNERDS — 28 May 2015 How to Git Better Using Git...
-
Upload
truongkhue -
Category
Documents
-
view
219 -
download
0
Transcript of NERDS — 28 May 2015 - · PDF fileNERDS — 28 May 2015 How to Git Better Using Git...
![Page 1: NERDS — 28 May 2015 - · PDF fileNERDS — 28 May 2015 How to Git Better Using Git Workflows (with some help from Atlasssian) Why should we Git Better? ... Git Flow: Hotfix Branches](https://reader036.fdocuments.us/reader036/viewer/2022070606/5a7e6c587f8b9a563b8e8b41/html5/thumbnails/1.jpg)
NERDS — 28 May 2015
How to Git Better Using Git Workflows (with some help from Atlasssian)
![Page 2: NERDS — 28 May 2015 - · PDF fileNERDS — 28 May 2015 How to Git Better Using Git Workflows (with some help from Atlasssian) Why should we Git Better? ... Git Flow: Hotfix Branches](https://reader036.fdocuments.us/reader036/viewer/2022070606/5a7e6c587f8b9a563b8e8b41/html5/thumbnails/2.jpg)
Why should we Git Better?
❖ Software Craftsmanship ❖ You are as proficient as you are
familiar with your tools ❖ You are more likely to cut
yourself with a dull knife than a sharp one
![Page 3: NERDS — 28 May 2015 - · PDF fileNERDS — 28 May 2015 How to Git Better Using Git Workflows (with some help from Atlasssian) Why should we Git Better? ... Git Flow: Hotfix Branches](https://reader036.fdocuments.us/reader036/viewer/2022070606/5a7e6c587f8b9a563b8e8b41/html5/thumbnails/3.jpg)
Fair Warning: Fancy Git Talk aHEAD
❖ Requires decent understanding of Git branches ❖ Lots of Pictures
❖ Available “Git up to Speed” Brown Bag (before 22 June)
![Page 4: NERDS — 28 May 2015 - · PDF fileNERDS — 28 May 2015 How to Git Better Using Git Workflows (with some help from Atlasssian) Why should we Git Better? ... Git Flow: Hotfix Branches](https://reader036.fdocuments.us/reader036/viewer/2022070606/5a7e6c587f8b9a563b8e8b41/html5/thumbnails/4.jpg)
NEWSFLASH! Git is not Version Control!
❖ You: Umm… so what is it then? ❖ Git is a set of tools that provides a workflow for your
version control.
❖ You: Umm… and that means what exactly? ❖ Use Git to customize your team’s way of using version
control in your daily development.
![Page 5: NERDS — 28 May 2015 - · PDF fileNERDS — 28 May 2015 How to Git Better Using Git Workflows (with some help from Atlasssian) Why should we Git Better? ... Git Flow: Hotfix Branches](https://reader036.fdocuments.us/reader036/viewer/2022070606/5a7e6c587f8b9a563b8e8b41/html5/thumbnails/5.jpg)
MIND = BLOWN
![Page 6: NERDS — 28 May 2015 - · PDF fileNERDS — 28 May 2015 How to Git Better Using Git Workflows (with some help from Atlasssian) Why should we Git Better? ... Git Flow: Hotfix Branches](https://reader036.fdocuments.us/reader036/viewer/2022070606/5a7e6c587f8b9a563b8e8b41/html5/thumbnails/6.jpg)
MIND = BLOWN
![Page 7: NERDS — 28 May 2015 - · PDF fileNERDS — 28 May 2015 How to Git Better Using Git Workflows (with some help from Atlasssian) Why should we Git Better? ... Git Flow: Hotfix Branches](https://reader036.fdocuments.us/reader036/viewer/2022070606/5a7e6c587f8b9a563b8e8b41/html5/thumbnails/7.jpg)
Popular Workflows for Git
❖ This is well treaded territory… in industry ❖ Documented in Confluence on DEVLAN
1. Centralized
2. Feature Branch
3. Git Flow
4. Forking
![Page 8: NERDS — 28 May 2015 - · PDF fileNERDS — 28 May 2015 How to Git Better Using Git Workflows (with some help from Atlasssian) Why should we Git Better? ... Git Flow: Hotfix Branches](https://reader036.fdocuments.us/reader036/viewer/2022070606/5a7e6c587f8b9a563b8e8b41/html5/thumbnails/8.jpg)
Popular Workflows for Git
❖ This is well treaded territory… in industry ❖ Documented in Confluence on DEVLAN
1. Centralized
2. Feature Branch
3. Git Flow
4. Forking (see Confluence)
![Page 9: NERDS — 28 May 2015 - · PDF fileNERDS — 28 May 2015 How to Git Better Using Git Workflows (with some help from Atlasssian) Why should we Git Better? ... Git Flow: Hotfix Branches](https://reader036.fdocuments.us/reader036/viewer/2022070606/5a7e6c587f8b9a563b8e8b41/html5/thumbnails/9.jpg)
Centralized (and why it’s bad)
![Page 10: NERDS — 28 May 2015 - · PDF fileNERDS — 28 May 2015 How to Git Better Using Git Workflows (with some help from Atlasssian) Why should we Git Better? ... Git Flow: Hotfix Branches](https://reader036.fdocuments.us/reader036/viewer/2022070606/5a7e6c587f8b9a563b8e8b41/html5/thumbnails/10.jpg)
Centralized (and why it’s bad)
![Page 11: NERDS — 28 May 2015 - · PDF fileNERDS — 28 May 2015 How to Git Better Using Git Workflows (with some help from Atlasssian) Why should we Git Better? ... Git Flow: Hotfix Branches](https://reader036.fdocuments.us/reader036/viewer/2022070606/5a7e6c587f8b9a563b8e8b41/html5/thumbnails/11.jpg)
Centralized (and why it’s bad)
![Page 12: NERDS — 28 May 2015 - · PDF fileNERDS — 28 May 2015 How to Git Better Using Git Workflows (with some help from Atlasssian) Why should we Git Better? ... Git Flow: Hotfix Branches](https://reader036.fdocuments.us/reader036/viewer/2022070606/5a7e6c587f8b9a563b8e8b41/html5/thumbnails/12.jpg)
Typical Git 3-Way Merge
![Page 13: NERDS — 28 May 2015 - · PDF fileNERDS — 28 May 2015 How to Git Better Using Git Workflows (with some help from Atlasssian) Why should we Git Better? ... Git Flow: Hotfix Branches](https://reader036.fdocuments.us/reader036/viewer/2022070606/5a7e6c587f8b9a563b8e8b41/html5/thumbnails/13.jpg)
Typical Git 3-Way Merge
![Page 14: NERDS — 28 May 2015 - · PDF fileNERDS — 28 May 2015 How to Git Better Using Git Workflows (with some help from Atlasssian) Why should we Git Better? ... Git Flow: Hotfix Branches](https://reader036.fdocuments.us/reader036/viewer/2022070606/5a7e6c587f8b9a563b8e8b41/html5/thumbnails/14.jpg)
Centralized (and why it’s bad)
❖ Everyone for themselves! ❖ Errors compounded ❖ Knowledge partitioning ❖ Clear history… ❖ Lack of project organization ❖ No efforts to improve quality built
into workflow
![Page 15: NERDS — 28 May 2015 - · PDF fileNERDS — 28 May 2015 How to Git Better Using Git Workflows (with some help from Atlasssian) Why should we Git Better? ... Git Flow: Hotfix Branches](https://reader036.fdocuments.us/reader036/viewer/2022070606/5a7e6c587f8b9a563b8e8b41/html5/thumbnails/15.jpg)
Solution: Modify Workflow
![Page 16: NERDS — 28 May 2015 - · PDF fileNERDS — 28 May 2015 How to Git Better Using Git Workflows (with some help from Atlasssian) Why should we Git Better? ... Git Flow: Hotfix Branches](https://reader036.fdocuments.us/reader036/viewer/2022070606/5a7e6c587f8b9a563b8e8b41/html5/thumbnails/16.jpg)
Solution: Modify Workflow
❖ Keep master clean! ❖ No direct commits ❖ No broken builds ❖ No partial features ❖ Merges only
![Page 17: NERDS — 28 May 2015 - · PDF fileNERDS — 28 May 2015 How to Git Better Using Git Workflows (with some help from Atlasssian) Why should we Git Better? ... Git Flow: Hotfix Branches](https://reader036.fdocuments.us/reader036/viewer/2022070606/5a7e6c587f8b9a563b8e8b41/html5/thumbnails/17.jpg)
Solution: Modify Workflow
❖ Keep master clean! ❖ No direct commits ❖ No broken builds ❖ No partial features ❖ Merges only
❖ Code Review of changes by team before merge
![Page 18: NERDS — 28 May 2015 - · PDF fileNERDS — 28 May 2015 How to Git Better Using Git Workflows (with some help from Atlasssian) Why should we Git Better? ... Git Flow: Hotfix Branches](https://reader036.fdocuments.us/reader036/viewer/2022070606/5a7e6c587f8b9a563b8e8b41/html5/thumbnails/18.jpg)
Solution: Modify Workflow
❖ Keep master clean! ❖ No direct commits ❖ No broken builds ❖ No partial features ❖ Merges only
❖ Code Review of changes by team before merge
❖ Clear history
![Page 19: NERDS — 28 May 2015 - · PDF fileNERDS — 28 May 2015 How to Git Better Using Git Workflows (with some help from Atlasssian) Why should we Git Better? ... Git Flow: Hotfix Branches](https://reader036.fdocuments.us/reader036/viewer/2022070606/5a7e6c587f8b9a563b8e8b41/html5/thumbnails/19.jpg)
Solution: Modify Workflow
❖ Keep master clean! ❖ No direct commits ❖ No broken builds ❖ No partial features ❖ Merges only
❖ Code Review of changes by team before merge
❖ Clear history❖ Clear improvements to quality
![Page 20: NERDS — 28 May 2015 - · PDF fileNERDS — 28 May 2015 How to Git Better Using Git Workflows (with some help from Atlasssian) Why should we Git Better? ... Git Flow: Hotfix Branches](https://reader036.fdocuments.us/reader036/viewer/2022070606/5a7e6c587f8b9a563b8e8b41/html5/thumbnails/20.jpg)
Feature Branching - A Branch Per Feature
![Page 21: NERDS — 28 May 2015 - · PDF fileNERDS — 28 May 2015 How to Git Better Using Git Workflows (with some help from Atlasssian) Why should we Git Better? ... Git Flow: Hotfix Branches](https://reader036.fdocuments.us/reader036/viewer/2022070606/5a7e6c587f8b9a563b8e8b41/html5/thumbnails/21.jpg)
Feature Branching - A Branch Per Feature
![Page 22: NERDS — 28 May 2015 - · PDF fileNERDS — 28 May 2015 How to Git Better Using Git Workflows (with some help from Atlasssian) Why should we Git Better? ... Git Flow: Hotfix Branches](https://reader036.fdocuments.us/reader036/viewer/2022070606/5a7e6c587f8b9a563b8e8b41/html5/thumbnails/22.jpg)
Feature Branching - Pull Requests
![Page 23: NERDS — 28 May 2015 - · PDF fileNERDS — 28 May 2015 How to Git Better Using Git Workflows (with some help from Atlasssian) Why should we Git Better? ... Git Flow: Hotfix Branches](https://reader036.fdocuments.us/reader036/viewer/2022070606/5a7e6c587f8b9a563b8e8b41/html5/thumbnails/23.jpg)
Feature Branching - Pull Requests
![Page 24: NERDS — 28 May 2015 - · PDF fileNERDS — 28 May 2015 How to Git Better Using Git Workflows (with some help from Atlasssian) Why should we Git Better? ... Git Flow: Hotfix Branches](https://reader036.fdocuments.us/reader036/viewer/2022070606/5a7e6c587f8b9a563b8e8b41/html5/thumbnails/24.jpg)
Feature Branching - Pull Requests
![Page 25: NERDS — 28 May 2015 - · PDF fileNERDS — 28 May 2015 How to Git Better Using Git Workflows (with some help from Atlasssian) Why should we Git Better? ... Git Flow: Hotfix Branches](https://reader036.fdocuments.us/reader036/viewer/2022070606/5a7e6c587f8b9a563b8e8b41/html5/thumbnails/25.jpg)
Feature Branching - Pull Requests
![Page 26: NERDS — 28 May 2015 - · PDF fileNERDS — 28 May 2015 How to Git Better Using Git Workflows (with some help from Atlasssian) Why should we Git Better? ... Git Flow: Hotfix Branches](https://reader036.fdocuments.us/reader036/viewer/2022070606/5a7e6c587f8b9a563b8e8b41/html5/thumbnails/26.jpg)
Feature Branching - Pull Requests
![Page 27: NERDS — 28 May 2015 - · PDF fileNERDS — 28 May 2015 How to Git Better Using Git Workflows (with some help from Atlasssian) Why should we Git Better? ... Git Flow: Hotfix Branches](https://reader036.fdocuments.us/reader036/viewer/2022070606/5a7e6c587f8b9a563b8e8b41/html5/thumbnails/27.jpg)
Feature Branching - Pull Requests
![Page 28: NERDS — 28 May 2015 - · PDF fileNERDS — 28 May 2015 How to Git Better Using Git Workflows (with some help from Atlasssian) Why should we Git Better? ... Git Flow: Hotfix Branches](https://reader036.fdocuments.us/reader036/viewer/2022070606/5a7e6c587f8b9a563b8e8b41/html5/thumbnails/28.jpg)
Feature Branching
❖ Pull Requests give us: ❖ A stable master branch protected from chaos ❖ Digestible pieces of Code Review ❖ Knowledge sharing / Collective code ownership ❖ Clear history of changes ❖ Clear improvements made
❖ But how about long term projects?
![Page 29: NERDS — 28 May 2015 - · PDF fileNERDS — 28 May 2015 How to Git Better Using Git Workflows (with some help from Atlasssian) Why should we Git Better? ... Git Flow: Hotfix Branches](https://reader036.fdocuments.us/reader036/viewer/2022070606/5a7e6c587f8b9a563b8e8b41/html5/thumbnails/29.jpg)
Git Flow, or How I Became OCD about DVCS
![Page 30: NERDS — 28 May 2015 - · PDF fileNERDS — 28 May 2015 How to Git Better Using Git Workflows (with some help from Atlasssian) Why should we Git Better? ... Git Flow: Hotfix Branches](https://reader036.fdocuments.us/reader036/viewer/2022070606/5a7e6c587f8b9a563b8e8b41/html5/thumbnails/30.jpg)
Git Flow: Historical Branches
❖ master contains stable delivered versions only ❖ develop is for stable incorporation of new features
![Page 31: NERDS — 28 May 2015 - · PDF fileNERDS — 28 May 2015 How to Git Better Using Git Workflows (with some help from Atlasssian) Why should we Git Better? ... Git Flow: Hotfix Branches](https://reader036.fdocuments.us/reader036/viewer/2022070606/5a7e6c587f8b9a563b8e8b41/html5/thumbnails/31.jpg)
Git Flow: Historical Branches
❖ master contains stable delivered versions only ❖ develop is for stable incorporation of new features
![Page 32: NERDS — 28 May 2015 - · PDF fileNERDS — 28 May 2015 How to Git Better Using Git Workflows (with some help from Atlasssian) Why should we Git Better? ... Git Flow: Hotfix Branches](https://reader036.fdocuments.us/reader036/viewer/2022070606/5a7e6c587f8b9a563b8e8b41/html5/thumbnails/32.jpg)
Git Flow: Feature Branches
❖ New features incorporated (by feature branching!) into develop
![Page 33: NERDS — 28 May 2015 - · PDF fileNERDS — 28 May 2015 How to Git Better Using Git Workflows (with some help from Atlasssian) Why should we Git Better? ... Git Flow: Hotfix Branches](https://reader036.fdocuments.us/reader036/viewer/2022070606/5a7e6c587f8b9a563b8e8b41/html5/thumbnails/33.jpg)
Git Flow: Feature Branches
❖ Branch from develop ❖ Pull Request to merge into develop
![Page 34: NERDS — 28 May 2015 - · PDF fileNERDS — 28 May 2015 How to Git Better Using Git Workflows (with some help from Atlasssian) Why should we Git Better? ... Git Flow: Hotfix Branches](https://reader036.fdocuments.us/reader036/viewer/2022070606/5a7e6c587f8b9a563b8e8b41/html5/thumbnails/34.jpg)
Git Flow: Feature Branches
❖ Branch from develop ❖ Pull Request to merge into develop
![Page 35: NERDS — 28 May 2015 - · PDF fileNERDS — 28 May 2015 How to Git Better Using Git Workflows (with some help from Atlasssian) Why should we Git Better? ... Git Flow: Hotfix Branches](https://reader036.fdocuments.us/reader036/viewer/2022070606/5a7e6c587f8b9a563b8e8b41/html5/thumbnails/35.jpg)
Git Flow: Release Branches
❖ Release candidates executed in separate release branch ❖ No new features — only fixes
![Page 36: NERDS — 28 May 2015 - · PDF fileNERDS — 28 May 2015 How to Git Better Using Git Workflows (with some help from Atlasssian) Why should we Git Better? ... Git Flow: Hotfix Branches](https://reader036.fdocuments.us/reader036/viewer/2022070606/5a7e6c587f8b9a563b8e8b41/html5/thumbnails/36.jpg)
Git Flow: Release Branches
❖ Release candidates executed in separate release branch ❖ No new features — only fixes
![Page 37: NERDS — 28 May 2015 - · PDF fileNERDS — 28 May 2015 How to Git Better Using Git Workflows (with some help from Atlasssian) Why should we Git Better? ... Git Flow: Hotfix Branches](https://reader036.fdocuments.us/reader036/viewer/2022070606/5a7e6c587f8b9a563b8e8b41/html5/thumbnails/37.jpg)
Git Flow: Release Branches
❖ Release candidates executed in separate release branch ❖ No new features — only fixes
![Page 38: NERDS — 28 May 2015 - · PDF fileNERDS — 28 May 2015 How to Git Better Using Git Workflows (with some help from Atlasssian) Why should we Git Better? ... Git Flow: Hotfix Branches](https://reader036.fdocuments.us/reader036/viewer/2022070606/5a7e6c587f8b9a563b8e8b41/html5/thumbnails/38.jpg)
Git Flow: Release Branches
❖ Release candidates executed in separate release branch ❖ No new features — only fixes
![Page 39: NERDS — 28 May 2015 - · PDF fileNERDS — 28 May 2015 How to Git Better Using Git Workflows (with some help from Atlasssian) Why should we Git Better? ... Git Flow: Hotfix Branches](https://reader036.fdocuments.us/reader036/viewer/2022070606/5a7e6c587f8b9a563b8e8b41/html5/thumbnails/39.jpg)
Git Flow: Hotfix Branches
❖ Branch for applying hotfixes (perfect for Discrepancy Reports) ❖ Merge into master and develop
1.0 1.0.1
![Page 40: NERDS — 28 May 2015 - · PDF fileNERDS — 28 May 2015 How to Git Better Using Git Workflows (with some help from Atlasssian) Why should we Git Better? ... Git Flow: Hotfix Branches](https://reader036.fdocuments.us/reader036/viewer/2022070606/5a7e6c587f8b9a563b8e8b41/html5/thumbnails/40.jpg)
Git Flow: Hotfix Branches
❖ Branch for applying hotfixes (perfect for Discrepancy Reports) ❖ Merge into master and develop
1.0 1.0.1
![Page 41: NERDS — 28 May 2015 - · PDF fileNERDS — 28 May 2015 How to Git Better Using Git Workflows (with some help from Atlasssian) Why should we Git Better? ... Git Flow: Hotfix Branches](https://reader036.fdocuments.us/reader036/viewer/2022070606/5a7e6c587f8b9a563b8e8b41/html5/thumbnails/41.jpg)
How Atlasssian Helps
❖ Track all issues in Jira ❖ Create feature branch
from each Jira issue
![Page 42: NERDS — 28 May 2015 - · PDF fileNERDS — 28 May 2015 How to Git Better Using Git Workflows (with some help from Atlasssian) Why should we Git Better? ... Git Flow: Hotfix Branches](https://reader036.fdocuments.us/reader036/viewer/2022070606/5a7e6c587f8b9a563b8e8b41/html5/thumbnails/42.jpg)
How Atlasssian Helps
❖ Track all issues in Jira ❖ Create feature branch
from each Jira issue ❖ Merge feature branch in
Stash using Pull Requests
![Page 43: NERDS — 28 May 2015 - · PDF fileNERDS — 28 May 2015 How to Git Better Using Git Workflows (with some help from Atlasssian) Why should we Git Better? ... Git Flow: Hotfix Branches](https://reader036.fdocuments.us/reader036/viewer/2022070606/5a7e6c587f8b9a563b8e8b41/html5/thumbnails/43.jpg)
Questions?
![Page 44: NERDS — 28 May 2015 - · PDF fileNERDS — 28 May 2015 How to Git Better Using Git Workflows (with some help from Atlasssian) Why should we Git Better? ... Git Flow: Hotfix Branches](https://reader036.fdocuments.us/reader036/viewer/2022070606/5a7e6c587f8b9a563b8e8b41/html5/thumbnails/44.jpg)
Questions?
GO FORTH AND ROCK