git flow
TRANSCRIPT
![Page 1: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/1.jpg)
GIT Flowfacebook.com/mfernandes.fernando
Friday, August 10, 12
![Page 2: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/2.jpg)
Why GIT?
Friday, August 10, 12
![Page 3: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/3.jpg)
Why GIT?• Distributed
Friday, August 10, 12
![Page 4: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/4.jpg)
Why GIT?• Distributed
• A clone of the *entire* repository (history, tags) in each dev machine
Friday, August 10, 12
![Page 5: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/5.jpg)
Why GIT?• Distributed
• A clone of the *entire* repository (history, tags) in each dev machine
• Code on the road! You are the repository. Multiple backups.
Friday, August 10, 12
![Page 6: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/6.jpg)
Why GIT?• Distributed
• A clone of the *entire* repository (history, tags) in each dev machine
• Code on the road! You are the repository. Multiple backups.
• Branching model
Friday, August 10, 12
![Page 7: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/7.jpg)
Why GIT?• Distributed
• A clone of the *entire* repository (history, tags) in each dev machine
• Code on the road! You are the repository. Multiple backups.
• Branching model
• Easy: git checkout -b <someFeature>
Friday, August 10, 12
![Page 8: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/8.jpg)
Why GIT?• Distributed
• A clone of the *entire* repository (history, tags) in each dev machine
• Code on the road! You are the repository. Multiple backups.
• Branching model
• Easy: git checkout -b <someFeature>
• Convenient: Create, try out an idea, commit, switch back, merge or discard.
Friday, August 10, 12
![Page 9: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/9.jpg)
Why GIT?• Distributed
• A clone of the *entire* repository (history, tags) in each dev machine
• Code on the road! You are the repository. Multiple backups.
• Branching model
• Easy: git checkout -b <someFeature>
• Convenient: Create, try out an idea, commit, switch back, merge or discard.
• Small and Fast
Friday, August 10, 12
![Page 10: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/10.jpg)
Why GIT?• Distributed
• A clone of the *entire* repository (history, tags) in each dev machine
• Code on the road! You are the repository. Multiple backups.
• Branching model
• Easy: git checkout -b <someFeature>
• Convenient: Create, try out an idea, commit, switch back, merge or discard.
• Small and Fast
• Written in C (which reduces runtime overhead associated with high-level languages)
Friday, August 10, 12
![Page 11: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/11.jpg)
Why GIT?• Distributed
• A clone of the *entire* repository (history, tags) in each dev machine
• Code on the road! You are the repository. Multiple backups.
• Branching model
• Easy: git checkout -b <someFeature>
• Convenient: Create, try out an idea, commit, switch back, merge or discard.
• Small and Fast
• Written in C (which reduces runtime overhead associated with high-level languages)
• Built to work on the Linux kernel (it has had to effectively handle large repositories from day one)
Friday, August 10, 12
![Page 12: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/12.jpg)
Benchmarks
Friday, August 10, 12
![Page 13: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/13.jpg)
Benchmarks
Friday, August 10, 12
![Page 14: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/14.jpg)
Benchmarks
Friday, August 10, 12
![Page 15: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/15.jpg)
Benchmarks
Friday, August 10, 12
![Page 16: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/16.jpg)
Benchmarks
Friday, August 10, 12
![Page 17: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/17.jpg)
Benchmarks
Friday, August 10, 12
![Page 18: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/18.jpg)
Benchmarks
Friday, August 10, 12
![Page 19: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/19.jpg)
Benchmarks
Friday, August 10, 12
![Page 20: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/20.jpg)
Staging (or index) Area
Friday, August 10, 12
![Page 21: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/21.jpg)
Staging (or index) Area
Friday, August 10, 12
![Page 22: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/22.jpg)
Staging (or index) Area
Friday, August 10, 12
![Page 23: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/23.jpg)
Free and Open Source
Friday, August 10, 12
![Page 24: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/24.jpg)
Free and Open Source
• GPLv2
Friday, August 10, 12
![Page 25: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/25.jpg)
Free and Open Source
• GPLv2
• Free, forever
Friday, August 10, 12
![Page 26: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/26.jpg)
Free and Open Source
• GPLv2
• Free, forever
• Download, inspect and modify GIT source
Friday, August 10, 12
![Page 27: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/27.jpg)
Workflows
Friday, August 10, 12
![Page 28: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/28.jpg)
Workflows
• getBestWorkflow()
Friday, August 10, 12
![Page 29: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/29.jpg)
Workflows
• getBestWorkflow()
• NPE
Friday, August 10, 12
![Page 30: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/30.jpg)
Workflows
• getBestWorkflow()
• NPE
• ANY!
Friday, August 10, 12
![Page 31: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/31.jpg)
Subversion-Style
Friday, August 10, 12
![Page 32: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/32.jpg)
Subversion-Style
Friday, August 10, 12
![Page 33: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/33.jpg)
Integration Manager
Friday, August 10, 12
![Page 34: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/34.jpg)
Integration Manager
Friday, August 10, 12
![Page 35: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/35.jpg)
Dictator and Lieutenants
Friday, August 10, 12
![Page 36: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/36.jpg)
Dictator and Lieutenants
Friday, August 10, 12
![Page 37: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/37.jpg)
gitflow
Friday, August 10, 12
![Page 38: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/38.jpg)
gitflow• GIT abstraction
Friday, August 10, 12
![Page 39: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/39.jpg)
gitflow• GIT abstraction
• Just a bunch of scripts
Friday, August 10, 12
![Page 40: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/40.jpg)
gitflow• GIT abstraction
• Just a bunch of scripts
• Greatly inspired by existing models
Friday, August 10, 12
![Page 41: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/41.jpg)
gitflow• GIT abstraction
• Just a bunch of scripts
• Greatly inspired by existing models
• Main branches:
Friday, August 10, 12
![Page 42: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/42.jpg)
gitflow• GIT abstraction
• Just a bunch of scripts
• Greatly inspired by existing models
• Main branches:
• master
Friday, August 10, 12
![Page 43: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/43.jpg)
gitflow• GIT abstraction
• Just a bunch of scripts
• Greatly inspired by existing models
• Main branches:
• master
• develop
Friday, August 10, 12
![Page 44: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/44.jpg)
gitflow• GIT abstraction
• Just a bunch of scripts
• Greatly inspired by existing models
• Main branches:
• master
• develop
• Support branches:
Friday, August 10, 12
![Page 45: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/45.jpg)
gitflow• GIT abstraction
• Just a bunch of scripts
• Greatly inspired by existing models
• Main branches:
• master
• develop
• Support branches:
• feature
Friday, August 10, 12
![Page 46: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/46.jpg)
gitflow• GIT abstraction
• Just a bunch of scripts
• Greatly inspired by existing models
• Main branches:
• master
• develop
• Support branches:
• feature
• release
Friday, August 10, 12
![Page 47: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/47.jpg)
gitflow• GIT abstraction
• Just a bunch of scripts
• Greatly inspired by existing models
• Main branches:
• master
• develop
• Support branches:
• feature
• release
• hotfix
Friday, August 10, 12
![Page 48: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/48.jpg)
gitflowThe BIG picture
Friday, August 10, 12
![Page 49: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/49.jpg)
gitflowThe BIG picture
Friday, August 10, 12
![Page 50: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/50.jpg)
gitflow: Main branches
Friday, August 10, 12
![Page 51: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/51.jpg)
gitflow: Main branches
Friday, August 10, 12
![Page 52: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/52.jpg)
gitflow: Main branches• origin/master is
where the source code of HEAD always reflects a production-ready state.
Friday, August 10, 12
![Page 53: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/53.jpg)
gitflow: Main branches• origin/master is
where the source code of HEAD always reflects a production-ready state.
• origin/develop is where the source code of HEAD always reflects a state with the latest delivered development changes for the next release.
Friday, August 10, 12
![Page 54: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/54.jpg)
gitflow: Supporting branches - FEATURE
Friday, August 10, 12
![Page 55: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/55.jpg)
gitflow: Supporting branches - FEATURE
Friday, August 10, 12
![Page 56: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/56.jpg)
gitflow: Supporting branches - FEATURE
• Definition: used to develop new features for the upcoming or a distant future release.
Friday, August 10, 12
![Page 57: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/57.jpg)
gitflow: Supporting branches - FEATURE
• Definition: used to develop new features for the upcoming or a distant future release.
• Tipically exist in developer repos only, NOT IN ORIGIN
Friday, August 10, 12
![Page 58: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/58.jpg)
gitflow: Supporting branches - FEATURE
• Definition: used to develop new features for the upcoming or a distant future release.
• Tipically exist in developer repos only, NOT IN ORIGIN
• Branch off from: DEVELOP
Friday, August 10, 12
![Page 59: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/59.jpg)
gitflow: Supporting branches - FEATURE
• Definition: used to develop new features for the upcoming or a distant future release.
• Tipically exist in developer repos only, NOT IN ORIGIN
• Branch off from: DEVELOP
• Must merge back into: DEVELOP
Friday, August 10, 12
![Page 60: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/60.jpg)
gitflow: Supporting branches - FEATURE
• Definition: used to develop new features for the upcoming or a distant future release.
• Tipically exist in developer repos only, NOT IN ORIGIN
• Branch off from: DEVELOP
• Must merge back into: DEVELOP
• Branch naming convention:
Friday, August 10, 12
![Page 61: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/61.jpg)
gitflow: Supporting branches - FEATURE
• Definition: used to develop new features for the upcoming or a distant future release.
• Tipically exist in developer repos only, NOT IN ORIGIN
• Branch off from: DEVELOP
• Must merge back into: DEVELOP
• Branch naming convention:
• <devName>-* (fernando-gallery)
Friday, August 10, 12
![Page 62: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/62.jpg)
gitflow: Supporting branches - FEATURE
• Definition: used to develop new features for the upcoming or a distant future release.
• Tipically exist in developer repos only, NOT IN ORIGIN
• Branch off from: DEVELOP
• Must merge back into: DEVELOP
• Branch naming convention:
• <devName>-* (fernando-gallery)
• (!) Not allowed: master, develop, release-* or hotfix-*
Friday, August 10, 12
![Page 63: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/63.jpg)
gitflow: Supporting branches - RELEASE
Friday, August 10, 12
![Page 64: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/64.jpg)
gitflow: Supporting branches - RELEASE
Friday, August 10, 12
![Page 65: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/65.jpg)
gitflow: Supporting branches - RELEASE• Definition: support preparation of a new
production release. Allow for MINOR bug fixes and preparing meta-data for a release (version number, build dates, etc.)
Friday, August 10, 12
![Page 66: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/66.jpg)
gitflow: Supporting branches - RELEASE• Definition: support preparation of a new
production release. Allow for MINOR bug fixes and preparing meta-data for a release (version number, build dates, etc.)
• When? develop (almost) reflect the desired state of the new release. All planned features were implemented.
Friday, August 10, 12
![Page 67: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/67.jpg)
gitflow: Supporting branches - RELEASE• Definition: support preparation of a new
production release. Allow for MINOR bug fixes and preparing meta-data for a release (version number, build dates, etc.)
• When? develop (almost) reflect the desired state of the new release. All planned features were implemented.
• Branch off from: DEVELOP
Friday, August 10, 12
![Page 68: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/68.jpg)
gitflow: Supporting branches - RELEASE• Definition: support preparation of a new
production release. Allow for MINOR bug fixes and preparing meta-data for a release (version number, build dates, etc.)
• When? develop (almost) reflect the desired state of the new release. All planned features were implemented.
• Branch off from: DEVELOP
• Must merge back into: DEVELOP and MASTER
Friday, August 10, 12
![Page 69: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/69.jpg)
gitflow: Supporting branches - RELEASE• Definition: support preparation of a new
production release. Allow for MINOR bug fixes and preparing meta-data for a release (version number, build dates, etc.)
• When? develop (almost) reflect the desired state of the new release. All planned features were implemented.
• Branch off from: DEVELOP
• Must merge back into: DEVELOP and MASTER
• Branch naming convention:
Friday, August 10, 12
![Page 70: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/70.jpg)
gitflow: Supporting branches - RELEASE• Definition: support preparation of a new
production release. Allow for MINOR bug fixes and preparing meta-data for a release (version number, build dates, etc.)
• When? develop (almost) reflect the desired state of the new release. All planned features were implemented.
• Branch off from: DEVELOP
• Must merge back into: DEVELOP and MASTER
• Branch naming convention:
• <release>-* (release-1.0)Friday, August 10, 12
![Page 71: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/71.jpg)
gitflow: Supporting branches - HOTFIX
Friday, August 10, 12
![Page 72: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/72.jpg)
gitflow: Supporting branches - HOTFIX
Friday, August 10, 12
![Page 73: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/73.jpg)
gitflow: Supporting branches - HOTFIX• Definition: arise from the necessity to
act immediately upon an undesired state of a live production version. CRITICAL bugs!
Friday, August 10, 12
![Page 74: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/74.jpg)
gitflow: Supporting branches - HOTFIX• Definition: arise from the necessity to
act immediately upon an undesired state of a live production version. CRITICAL bugs!
• Branched off from the corresponding tag on the master branch that marks the production version.
Friday, August 10, 12
![Page 75: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/75.jpg)
gitflow: Supporting branches - HOTFIX• Definition: arise from the necessity to
act immediately upon an undesired state of a live production version. CRITICAL bugs!
• Branched off from the corresponding tag on the master branch that marks the production version.
• Branch off from: MASTER
Friday, August 10, 12
![Page 76: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/76.jpg)
gitflow: Supporting branches - HOTFIX• Definition: arise from the necessity to
act immediately upon an undesired state of a live production version. CRITICAL bugs!
• Branched off from the corresponding tag on the master branch that marks the production version.
• Branch off from: MASTER
• Must merge back into: DEVELOP and MASTER
Friday, August 10, 12
![Page 77: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/77.jpg)
gitflow: Supporting branches - HOTFIX• Definition: arise from the necessity to
act immediately upon an undesired state of a live production version. CRITICAL bugs!
• Branched off from the corresponding tag on the master branch that marks the production version.
• Branch off from: MASTER
• Must merge back into: DEVELOP and MASTER
• Branch naming convention:
Friday, August 10, 12
![Page 78: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/78.jpg)
gitflow: Supporting branches - HOTFIX• Definition: arise from the necessity to
act immediately upon an undesired state of a live production version. CRITICAL bugs!
• Branched off from the corresponding tag on the master branch that marks the production version.
• Branch off from: MASTER
• Must merge back into: DEVELOP and MASTER
• Branch naming convention:
• hotfix-* (hotfix-1.2.1)Friday, August 10, 12
![Page 79: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/79.jpg)
gitflowThe BIG picture
(again)
Friday, August 10, 12
![Page 80: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/80.jpg)
gitflowThe BIG picture
(again)
Friday, August 10, 12
![Page 81: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/81.jpg)
Feature. How?
Friday, August 10, 12
![Page 82: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/82.jpg)
Feature. How?• git checkout -b myfeature develop
Friday, August 10, 12
![Page 83: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/83.jpg)
Feature. How?• git checkout -b myfeature develop
• Switched to a new branch “myfeature”
Friday, August 10, 12
![Page 84: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/84.jpg)
Feature. How?• git checkout -b myfeature develop
• Switched to a new branch “myfeature”
• Do some work. When done...
Friday, August 10, 12
![Page 85: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/85.jpg)
Feature. How?• git checkout -b myfeature develop
• Switched to a new branch “myfeature”
• Do some work. When done...
• git checkout develop
Friday, August 10, 12
![Page 86: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/86.jpg)
Feature. How?• git checkout -b myfeature develop
• Switched to a new branch “myfeature”
• Do some work. When done...
• git checkout develop
• Switched to branch ‘develop’
Friday, August 10, 12
![Page 87: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/87.jpg)
Feature. How?• git checkout -b myfeature develop
• Switched to a new branch “myfeature”
• Do some work. When done...
• git checkout develop
• Switched to branch ‘develop’
• git merge --no-ff myfeature
Friday, August 10, 12
![Page 88: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/88.jpg)
Feature. How?• git checkout -b myfeature develop
• Switched to a new branch “myfeature”
• Do some work. When done...
• git checkout develop
• Switched to branch ‘develop’
• git merge --no-ff myfeature
• Updating ea1b92a...
Friday, August 10, 12
![Page 89: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/89.jpg)
Feature. How?• git checkout -b myfeature develop
• Switched to a new branch “myfeature”
• Do some work. When done...
• git checkout develop
• Switched to branch ‘develop’
• git merge --no-ff myfeature
• Updating ea1b92a...
• git branch -d myfeature
Friday, August 10, 12
![Page 90: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/90.jpg)
Feature. How?• git checkout -b myfeature develop
• Switched to a new branch “myfeature”
• Do some work. When done...
• git checkout develop
• Switched to branch ‘develop’
• git merge --no-ff myfeature
• Updating ea1b92a...
• git branch -d myfeature
• Deleted branch myfeature
Friday, August 10, 12
![Page 91: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/91.jpg)
Feature. How?• git checkout -b myfeature develop
• Switched to a new branch “myfeature”
• Do some work. When done...
• git checkout develop
• Switched to branch ‘develop’
• git merge --no-ff myfeature
• Updating ea1b92a...
• git branch -d myfeature
• Deleted branch myfeature
• git push origin develop
Friday, August 10, 12
![Page 92: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/92.jpg)
--no-ff
Friday, August 10, 12
![Page 93: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/93.jpg)
--no-ff• This flags causes the merge to
always create a new commit object.
Friday, August 10, 12
![Page 94: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/94.jpg)
--no-ff• This flags causes the merge to
always create a new commit object.
• Without it, it’s impossible to see from Git history which of the commit objects together have implemented a feature.
Friday, August 10, 12
![Page 95: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/95.jpg)
--no-ff• This flags causes the merge to
always create a new commit object.
• Without it, it’s impossible to see from Git history which of the commit objects together have implemented a feature.
• You will have to read all the log messages manually.
Friday, August 10, 12
![Page 96: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/96.jpg)
--no-ff• This flags causes the merge to
always create a new commit object.
• Without it, it’s impossible to see from Git history which of the commit objects together have implemented a feature.
• You will have to read all the log messages manually.
• Compare:
Friday, August 10, 12
![Page 97: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/97.jpg)
--no-ff• This flags causes the merge to
always create a new commit object.
• Without it, it’s impossible to see from Git history which of the commit objects together have implemented a feature.
• You will have to read all the log messages manually.
• Compare:
Friday, August 10, 12
![Page 98: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/98.jpg)
Create a release. How?
Friday, August 10, 12
![Page 99: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/99.jpg)
Create a release. How?
• git checkout -b release-1.2 develop
Friday, August 10, 12
![Page 100: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/100.jpg)
Create a release. How?
• git checkout -b release-1.2 develop
• Switched to a new branch “release-1.2”
Friday, August 10, 12
![Page 101: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/101.jpg)
Create a release. How?
• git checkout -b release-1.2 develop
• Switched to a new branch “release-1.2”
• Manually modify the README, RELEASE NOTES, etc.
Friday, August 10, 12
![Page 102: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/102.jpg)
Create a release. How?
• git checkout -b release-1.2 develop
• Switched to a new branch “release-1.2”
• Manually modify the README, RELEASE NOTES, etc.
• git commit -a -m “Bumped to version 1.2”
Friday, August 10, 12
![Page 103: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/103.jpg)
Create a release. How?
• git checkout -b release-1.2 develop
• Switched to a new branch “release-1.2”
• Manually modify the README, RELEASE NOTES, etc.
• git commit -a -m “Bumped to version 1.2”
• [release-1.2 74d9424] Bumped to version 1.2
Friday, August 10, 12
![Page 104: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/104.jpg)
Create a release. How?
• git checkout -b release-1.2 develop
• Switched to a new branch “release-1.2”
• Manually modify the README, RELEASE NOTES, etc.
• git commit -a -m “Bumped to version 1.2”
• [release-1.2 74d9424] Bumped to version 1.2
• 1 files changed, 1 insertions(+), 1 deletions(-)
Friday, August 10, 12
![Page 105: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/105.jpg)
Finish a release. How?
Friday, August 10, 12
![Page 106: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/106.jpg)
Finish a release. How?• When the release branch is ready to become a real release, it is merged into master (every commit on
master is a new release by definition) and the commit is tagged for easy future reference to this historical version. Finally it’s merged back into develop, so future releases contain the bug fixes.
Friday, August 10, 12
![Page 107: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/107.jpg)
Finish a release. How?• When the release branch is ready to become a real release, it is merged into master (every commit on
master is a new release by definition) and the commit is tagged for easy future reference to this historical version. Finally it’s merged back into develop, so future releases contain the bug fixes.
• git checkout master
Friday, August 10, 12
![Page 108: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/108.jpg)
Finish a release. How?• When the release branch is ready to become a real release, it is merged into master (every commit on
master is a new release by definition) and the commit is tagged for easy future reference to this historical version. Finally it’s merged back into develop, so future releases contain the bug fixes.
• git checkout master
• Switched to branch “master”
Friday, August 10, 12
![Page 109: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/109.jpg)
Finish a release. How?• When the release branch is ready to become a real release, it is merged into master (every commit on
master is a new release by definition) and the commit is tagged for easy future reference to this historical version. Finally it’s merged back into develop, so future releases contain the bug fixes.
• git checkout master
• Switched to branch “master”
• git merge --no-ff release-1.2
Friday, August 10, 12
![Page 110: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/110.jpg)
Finish a release. How?• When the release branch is ready to become a real release, it is merged into master (every commit on
master is a new release by definition) and the commit is tagged for easy future reference to this historical version. Finally it’s merged back into develop, so future releases contain the bug fixes.
• git checkout master
• Switched to branch “master”
• git merge --no-ff release-1.2
• Merge made by recursive. (Summary of changes)
Friday, August 10, 12
![Page 111: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/111.jpg)
Finish a release. How?• When the release branch is ready to become a real release, it is merged into master (every commit on
master is a new release by definition) and the commit is tagged for easy future reference to this historical version. Finally it’s merged back into develop, so future releases contain the bug fixes.
• git checkout master
• Switched to branch “master”
• git merge --no-ff release-1.2
• Merge made by recursive. (Summary of changes)
• To keep the changes made in the release branch, we need to merge those back into develop.
Friday, August 10, 12
![Page 112: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/112.jpg)
Finish a release. How?• When the release branch is ready to become a real release, it is merged into master (every commit on
master is a new release by definition) and the commit is tagged for easy future reference to this historical version. Finally it’s merged back into develop, so future releases contain the bug fixes.
• git checkout master
• Switched to branch “master”
• git merge --no-ff release-1.2
• Merge made by recursive. (Summary of changes)
• To keep the changes made in the release branch, we need to merge those back into develop.
• git tag -a 1.2 // Can use -s or -u <key> to sign cryptographically
Friday, August 10, 12
![Page 113: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/113.jpg)
Finish a release. How?• When the release branch is ready to become a real release, it is merged into master (every commit on
master is a new release by definition) and the commit is tagged for easy future reference to this historical version. Finally it’s merged back into develop, so future releases contain the bug fixes.
• git checkout master
• Switched to branch “master”
• git merge --no-ff release-1.2
• Merge made by recursive. (Summary of changes)
• To keep the changes made in the release branch, we need to merge those back into develop.
• git tag -a 1.2 // Can use -s or -u <key> to sign cryptographically
• git checkout develop
Friday, August 10, 12
![Page 114: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/114.jpg)
Finish a release. How?• When the release branch is ready to become a real release, it is merged into master (every commit on
master is a new release by definition) and the commit is tagged for easy future reference to this historical version. Finally it’s merged back into develop, so future releases contain the bug fixes.
• git checkout master
• Switched to branch “master”
• git merge --no-ff release-1.2
• Merge made by recursive. (Summary of changes)
• To keep the changes made in the release branch, we need to merge those back into develop.
• git tag -a 1.2 // Can use -s or -u <key> to sign cryptographically
• git checkout develop
• Switched to branch “develop”
Friday, August 10, 12
![Page 115: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/115.jpg)
Finish a release. How?• When the release branch is ready to become a real release, it is merged into master (every commit on
master is a new release by definition) and the commit is tagged for easy future reference to this historical version. Finally it’s merged back into develop, so future releases contain the bug fixes.
• git checkout master
• Switched to branch “master”
• git merge --no-ff release-1.2
• Merge made by recursive. (Summary of changes)
• To keep the changes made in the release branch, we need to merge those back into develop.
• git tag -a 1.2 // Can use -s or -u <key> to sign cryptographically
• git checkout develop
• Switched to branch “develop”
• git merge --no-ff release-1.2
Friday, August 10, 12
![Page 116: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/116.jpg)
Finish a release. How?• When the release branch is ready to become a real release, it is merged into master (every commit on
master is a new release by definition) and the commit is tagged for easy future reference to this historical version. Finally it’s merged back into develop, so future releases contain the bug fixes.
• git checkout master
• Switched to branch “master”
• git merge --no-ff release-1.2
• Merge made by recursive. (Summary of changes)
• To keep the changes made in the release branch, we need to merge those back into develop.
• git tag -a 1.2 // Can use -s or -u <key> to sign cryptographically
• git checkout develop
• Switched to branch “develop”
• git merge --no-ff release-1.2
• Merge made by recursive. (Summary of changes)
Friday, August 10, 12
![Page 117: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/117.jpg)
Finish a release. How?• When the release branch is ready to become a real release, it is merged into master (every commit on
master is a new release by definition) and the commit is tagged for easy future reference to this historical version. Finally it’s merged back into develop, so future releases contain the bug fixes.
• git checkout master
• Switched to branch “master”
• git merge --no-ff release-1.2
• Merge made by recursive. (Summary of changes)
• To keep the changes made in the release branch, we need to merge those back into develop.
• git tag -a 1.2 // Can use -s or -u <key> to sign cryptographically
• git checkout develop
• Switched to branch “develop”
• git merge --no-ff release-1.2
• Merge made by recursive. (Summary of changes)
• It may lead to a merge conflict. Fix it and commit.
Friday, August 10, 12
![Page 118: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/118.jpg)
Finish a release. How?• When the release branch is ready to become a real release, it is merged into master (every commit on
master is a new release by definition) and the commit is tagged for easy future reference to this historical version. Finally it’s merged back into develop, so future releases contain the bug fixes.
• git checkout master
• Switched to branch “master”
• git merge --no-ff release-1.2
• Merge made by recursive. (Summary of changes)
• To keep the changes made in the release branch, we need to merge those back into develop.
• git tag -a 1.2 // Can use -s or -u <key> to sign cryptographically
• git checkout develop
• Switched to branch “develop”
• git merge --no-ff release-1.2
• Merge made by recursive. (Summary of changes)
• It may lead to a merge conflict. Fix it and commit.
• Now we are really done and the release branch may be removed, since we don’t need it anymore.
Friday, August 10, 12
![Page 119: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/119.jpg)
Finish a release. How?• When the release branch is ready to become a real release, it is merged into master (every commit on
master is a new release by definition) and the commit is tagged for easy future reference to this historical version. Finally it’s merged back into develop, so future releases contain the bug fixes.
• git checkout master
• Switched to branch “master”
• git merge --no-ff release-1.2
• Merge made by recursive. (Summary of changes)
• To keep the changes made in the release branch, we need to merge those back into develop.
• git tag -a 1.2 // Can use -s or -u <key> to sign cryptographically
• git checkout develop
• Switched to branch “develop”
• git merge --no-ff release-1.2
• Merge made by recursive. (Summary of changes)
• It may lead to a merge conflict. Fix it and commit.
• Now we are really done and the release branch may be removed, since we don’t need it anymore.
• git branch -d release-1.2
Friday, August 10, 12
![Page 120: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/120.jpg)
Finish a release. How?• When the release branch is ready to become a real release, it is merged into master (every commit on
master is a new release by definition) and the commit is tagged for easy future reference to this historical version. Finally it’s merged back into develop, so future releases contain the bug fixes.
• git checkout master
• Switched to branch “master”
• git merge --no-ff release-1.2
• Merge made by recursive. (Summary of changes)
• To keep the changes made in the release branch, we need to merge those back into develop.
• git tag -a 1.2 // Can use -s or -u <key> to sign cryptographically
• git checkout develop
• Switched to branch “develop”
• git merge --no-ff release-1.2
• Merge made by recursive. (Summary of changes)
• It may lead to a merge conflict. Fix it and commit.
• Now we are really done and the release branch may be removed, since we don’t need it anymore.
• git branch -d release-1.2
• Deleted branch release-1.2 (was ff452fe)
Friday, August 10, 12
![Page 121: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/121.jpg)
Create a hotfix. How?
Friday, August 10, 12
![Page 122: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/122.jpg)
Create a hotfix. How?• git checkout -b hotfix-1.2.1 master
Friday, August 10, 12
![Page 123: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/123.jpg)
Create a hotfix. How?• git checkout -b hotfix-1.2.1 master
• Switched to a new branch “hotfix-1.2.1”
Friday, August 10, 12
![Page 124: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/124.jpg)
Create a hotfix. How?• git checkout -b hotfix-1.2.1 master
• Switched to a new branch “hotfix-1.2.1”
• Manually modify the README, RELEASE NOTES, etc.
Friday, August 10, 12
![Page 125: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/125.jpg)
Create a hotfix. How?• git checkout -b hotfix-1.2.1 master
• Switched to a new branch “hotfix-1.2.1”
• Manually modify the README, RELEASE NOTES, etc.
• git commit -a -m “Bumped to version 1.2.1”
Friday, August 10, 12
![Page 126: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/126.jpg)
Create a hotfix. How?• git checkout -b hotfix-1.2.1 master
• Switched to a new branch “hotfix-1.2.1”
• Manually modify the README, RELEASE NOTES, etc.
• git commit -a -m “Bumped to version 1.2.1”
• [hotfix-1.2.1 416e61] Bumped to version 1.2.1
Friday, August 10, 12
![Page 127: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/127.jpg)
Create a hotfix. How?• git checkout -b hotfix-1.2.1 master
• Switched to a new branch “hotfix-1.2.1”
• Manually modify the README, RELEASE NOTES, etc.
• git commit -a -m “Bumped to version 1.2.1”
• [hotfix-1.2.1 416e61] Bumped to version 1.2.1
• 1 files changed, 1 insertions(+), 1 deletions(-)
Friday, August 10, 12
![Page 128: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/128.jpg)
Create a hotfix. How?• git checkout -b hotfix-1.2.1 master
• Switched to a new branch “hotfix-1.2.1”
• Manually modify the README, RELEASE NOTES, etc.
• git commit -a -m “Bumped to version 1.2.1”
• [hotfix-1.2.1 416e61] Bumped to version 1.2.1
• 1 files changed, 1 insertions(+), 1 deletions(-)
• Fix the bug and commit the fix.
Friday, August 10, 12
![Page 129: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/129.jpg)
Create a hotfix. How?• git checkout -b hotfix-1.2.1 master
• Switched to a new branch “hotfix-1.2.1”
• Manually modify the README, RELEASE NOTES, etc.
• git commit -a -m “Bumped to version 1.2.1”
• [hotfix-1.2.1 416e61] Bumped to version 1.2.1
• 1 files changed, 1 insertions(+), 1 deletions(-)
• Fix the bug and commit the fix.
• git commit -m “Fixed severe production problem”
Friday, August 10, 12
![Page 130: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/130.jpg)
Create a hotfix. How?• git checkout -b hotfix-1.2.1 master
• Switched to a new branch “hotfix-1.2.1”
• Manually modify the README, RELEASE NOTES, etc.
• git commit -a -m “Bumped to version 1.2.1”
• [hotfix-1.2.1 416e61] Bumped to version 1.2.1
• 1 files changed, 1 insertions(+), 1 deletions(-)
• Fix the bug and commit the fix.
• git commit -m “Fixed severe production problem”
• [hotfix-1.2.1 416e61] Fixed severe production problem.
Friday, August 10, 12
![Page 131: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/131.jpg)
Create a hotfix. How?• git checkout -b hotfix-1.2.1 master
• Switched to a new branch “hotfix-1.2.1”
• Manually modify the README, RELEASE NOTES, etc.
• git commit -a -m “Bumped to version 1.2.1”
• [hotfix-1.2.1 416e61] Bumped to version 1.2.1
• 1 files changed, 1 insertions(+), 1 deletions(-)
• Fix the bug and commit the fix.
• git commit -m “Fixed severe production problem”
• [hotfix-1.2.1 416e61] Fixed severe production problem.
• 5 files changed, 32 insertions(+), 17 deletions(-)
Friday, August 10, 12
![Page 132: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/132.jpg)
Finish a hotfix. How?
Friday, August 10, 12
![Page 133: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/133.jpg)
Finish a hotfix. How?• git checkout master
Friday, August 10, 12
![Page 134: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/134.jpg)
Finish a hotfix. How?• git checkout master
• Switched to branch “master”
Friday, August 10, 12
![Page 135: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/135.jpg)
Finish a hotfix. How?• git checkout master
• Switched to branch “master”
• git merge --no-ff hotfix-1.2.1
Friday, August 10, 12
![Page 136: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/136.jpg)
Finish a hotfix. How?• git checkout master
• Switched to branch “master”
• git merge --no-ff hotfix-1.2.1
• Merge made by recursive. (Summary of changes)
Friday, August 10, 12
![Page 137: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/137.jpg)
Finish a hotfix. How?• git checkout master
• Switched to branch “master”
• git merge --no-ff hotfix-1.2.1
• Merge made by recursive. (Summary of changes)
• git tag -a 1.2.1 // Again, this can be done cryptographically
Friday, August 10, 12
![Page 138: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/138.jpg)
Finish a hotfix. How?• git checkout master
• Switched to branch “master”
• git merge --no-ff hotfix-1.2.1
• Merge made by recursive. (Summary of changes)
• git tag -a 1.2.1 // Again, this can be done cryptographically
• Include the bugfix in develop too. The exception: if there is a release branch, the hotfix changes need to be merge into that release branch instead of develop.
Friday, August 10, 12
![Page 139: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/139.jpg)
Finish a hotfix. How?• git checkout master
• Switched to branch “master”
• git merge --no-ff hotfix-1.2.1
• Merge made by recursive. (Summary of changes)
• git tag -a 1.2.1 // Again, this can be done cryptographically
• Include the bugfix in develop too. The exception: if there is a release branch, the hotfix changes need to be merge into that release branch instead of develop.
• git checkout develop
Friday, August 10, 12
![Page 140: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/140.jpg)
Finish a hotfix. How?• git checkout master
• Switched to branch “master”
• git merge --no-ff hotfix-1.2.1
• Merge made by recursive. (Summary of changes)
• git tag -a 1.2.1 // Again, this can be done cryptographically
• Include the bugfix in develop too. The exception: if there is a release branch, the hotfix changes need to be merge into that release branch instead of develop.
• git checkout develop
• Switched to branch ‘develop’
Friday, August 10, 12
![Page 141: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/141.jpg)
Finish a hotfix. How?• git checkout master
• Switched to branch “master”
• git merge --no-ff hotfix-1.2.1
• Merge made by recursive. (Summary of changes)
• git tag -a 1.2.1 // Again, this can be done cryptographically
• Include the bugfix in develop too. The exception: if there is a release branch, the hotfix changes need to be merge into that release branch instead of develop.
• git checkout develop
• Switched to branch ‘develop’
• git merge --no-ff hotfix-1.2.1
Friday, August 10, 12
![Page 142: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/142.jpg)
Finish a hotfix. How?• git checkout master
• Switched to branch “master”
• git merge --no-ff hotfix-1.2.1
• Merge made by recursive. (Summary of changes)
• git tag -a 1.2.1 // Again, this can be done cryptographically
• Include the bugfix in develop too. The exception: if there is a release branch, the hotfix changes need to be merge into that release branch instead of develop.
• git checkout develop
• Switched to branch ‘develop’
• git merge --no-ff hotfix-1.2.1
• Merge made by recursive. (Summary of changes)
Friday, August 10, 12
![Page 143: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/143.jpg)
Finish a hotfix. How?• git checkout master
• Switched to branch “master”
• git merge --no-ff hotfix-1.2.1
• Merge made by recursive. (Summary of changes)
• git tag -a 1.2.1 // Again, this can be done cryptographically
• Include the bugfix in develop too. The exception: if there is a release branch, the hotfix changes need to be merge into that release branch instead of develop.
• git checkout develop
• Switched to branch ‘develop’
• git merge --no-ff hotfix-1.2.1
• Merge made by recursive. (Summary of changes)
• Finally remove the temporary branch
Friday, August 10, 12
![Page 144: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/144.jpg)
Finish a hotfix. How?• git checkout master
• Switched to branch “master”
• git merge --no-ff hotfix-1.2.1
• Merge made by recursive. (Summary of changes)
• git tag -a 1.2.1 // Again, this can be done cryptographically
• Include the bugfix in develop too. The exception: if there is a release branch, the hotfix changes need to be merge into that release branch instead of develop.
• git checkout develop
• Switched to branch ‘develop’
• git merge --no-ff hotfix-1.2.1
• Merge made by recursive. (Summary of changes)
• Finally remove the temporary branch
• git branch -d hotfix-1.2.1
Friday, August 10, 12
![Page 145: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/145.jpg)
Finish a hotfix. How?• git checkout master
• Switched to branch “master”
• git merge --no-ff hotfix-1.2.1
• Merge made by recursive. (Summary of changes)
• git tag -a 1.2.1 // Again, this can be done cryptographically
• Include the bugfix in develop too. The exception: if there is a release branch, the hotfix changes need to be merge into that release branch instead of develop.
• git checkout develop
• Switched to branch ‘develop’
• git merge --no-ff hotfix-1.2.1
• Merge made by recursive. (Summary of changes)
• Finally remove the temporary branch
• git branch -d hotfix-1.2.1
• Deleted branch hotfix-1.2.1 (was abbe5d6)
Friday, August 10, 12
![Page 146: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/146.jpg)
It was just a flesh wound, right?
That’s it!
Friday, August 10, 12
![Page 147: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/147.jpg)
Referenceshttp://nvie.com/posts/a-successful-git-branching-model/
http://learn.github.com/p/tagging.html
http://reinh.com/blog/2009/03/02/a-git-workflow-for-agile-teams.html
http://stackoverflow.com/questions/1616957/how-do-you-roll-back-reset-a-git-repository-to-a-particular-commit
http://stackoverflow.com/questions/1457103/what-is-the-difference-between-a-tag-and-a-branch-in-git
Friday, August 10, 12
![Page 148: Git Flow](https://reader033.vdocument.in/reader033/viewer/2022060107/5549fea3b4c905e56c8b4e05/html5/thumbnails/148.jpg)
Thanks!
Friday, August 10, 12