Git flow Introduction
-
Upload
david-paluy -
Category
Self Improvement
-
view
1.760 -
download
1
description
Transcript of Git flow Introduction
![Page 1: Git flow Introduction](https://reader036.fdocuments.us/reader036/viewer/2022081907/5403a6508d7f72de4c8b4856/html5/thumbnails/1.jpg)
Git Flow Introduction
David PaluyAugust 2012
![Page 3: Git flow Introduction](https://reader036.fdocuments.us/reader036/viewer/2022081907/5403a6508d7f72de4c8b4856/html5/thumbnails/3.jpg)
Master Branch
origin/master to be the main branch where the source code of HEAD always reflects a production-ready state.
All of the changes should be merged back into master somehow and then tagged with a release number.
![Page 4: Git flow Introduction](https://reader036.fdocuments.us/reader036/viewer/2022081907/5403a6508d7f72de4c8b4856/html5/thumbnails/4.jpg)
Develop Branch
origin/develop to be the main branch where the source code of HEAD always reflects a state with the latest delivered development changes for the next release. Some would call this the “integration branch”. This is where any automatic nightly builds are built from.
Each time when changes are merged back into master, this is a new production release by definition.
![Page 5: Git flow Introduction](https://reader036.fdocuments.us/reader036/viewer/2022081907/5403a6508d7f72de4c8b4856/html5/thumbnails/5.jpg)
Supporting branches
● Feature branches● Release branches● Hotfix branches
![Page 6: Git flow Introduction](https://reader036.fdocuments.us/reader036/viewer/2022081907/5403a6508d7f72de4c8b4856/html5/thumbnails/6.jpg)
Feature branches
● May branch off from: develop● Must merge back into: develop● Branch naming convention: anything except
master, develop, release-*, or hotfix-*● Used to develop new features for the
upcoming or a distant future release
![Page 7: Git flow Introduction](https://reader036.fdocuments.us/reader036/viewer/2022081907/5403a6508d7f72de4c8b4856/html5/thumbnails/7.jpg)
Release branches
● May branch off from: develop● Must merge back into: develop and master● Branch naming convention: release-*● Release branches support preparation of a
new production release. They allow for minor bug fixes and preparing meta-data for a release (version number, build dates, etc.)
● By doing all of this work on a release branch, the develop branch is cleared to receive features for the next big release.
![Page 8: Git flow Introduction](https://reader036.fdocuments.us/reader036/viewer/2022081907/5403a6508d7f72de4c8b4856/html5/thumbnails/8.jpg)
Hotfix branches
● May branch off from: master
● Must merge back into: develop and master
● Branch naming convention: hotfix-*
![Page 9: Git flow Introduction](https://reader036.fdocuments.us/reader036/viewer/2022081907/5403a6508d7f72de4c8b4856/html5/thumbnails/9.jpg)
Gitflow
A collection of Git extensions to provide high-level repository operations
https://github.com/nvie/gitflow
![Page 10: Git flow Introduction](https://reader036.fdocuments.us/reader036/viewer/2022081907/5403a6508d7f72de4c8b4856/html5/thumbnails/10.jpg)
Initialize basic branch structure
git flow init [-d]
The -d flag will accept all defaults.
![Page 11: Git flow Introduction](https://reader036.fdocuments.us/reader036/viewer/2022081907/5403a6508d7f72de4c8b4856/html5/thumbnails/11.jpg)
List / Start / Finish feature branches
git flow feature
git flow feature start <name>
git flow feature finish <name>
Push / Pull feature branches
git flow feature publish <name>
git flow feature pull <remote> <name>
![Page 12: Git flow Introduction](https://reader036.fdocuments.us/reader036/viewer/2022081907/5403a6508d7f72de4c8b4856/html5/thumbnails/12.jpg)
List / Start / Finish release branches
git flow release
git flow release start <release>
git flow release finish <release>
![Page 13: Git flow Introduction](https://reader036.fdocuments.us/reader036/viewer/2022081907/5403a6508d7f72de4c8b4856/html5/thumbnails/13.jpg)
List / Start / Finish hotfix branches
git flow hotfix
git flow hotfix start <release>
git flow hotfix finish <release>
![Page 14: Git flow Introduction](https://reader036.fdocuments.us/reader036/viewer/2022081907/5403a6508d7f72de4c8b4856/html5/thumbnails/14.jpg)
Summary
![Page 15: Git flow Introduction](https://reader036.fdocuments.us/reader036/viewer/2022081907/5403a6508d7f72de4c8b4856/html5/thumbnails/15.jpg)
Summary
It forms an elegant mental model that is easy to comprehend and allows team members to develop a shared understanding of the branching and releasing processes.