GitFlow is a branching model for Git, created by Vincent Driessen. It has attracted a lot of attention because it is very well suited to collaboration and scaling the development team
2. Lack of etiquette and manners is a huge turn off.
KnolX Etiquettes
Punctuality
Respect Knolx session timings, you
are requested not to join sessions
after a 5 minutes threshold post
the session start time.
Feedback
Make sure to submit a constructive
feedback for all sessions as it is
very helpful for the presenter.
Mute
Please keep your window on mute
Avoid Disturbance
Avoid leaving your window
unmuted after asking a question
5. Introduction
● Git Flow is Git workflow design
● Defines a strict branching model designed around the project release
● This provides a robust framework for managing larger projects
● Suited for projects having scheduled release cycle and continuous delivery
● Assigns specific roles to different branches
● Defines how and when the branches should inteact
6. Introduction
● Command line tool with an installation process
● Git Flow is a wrapper around Git
● After installing git-flow you can use it in your project by executing git flow init
● git flow init is extension of default command git init
9. Develop and Master Branches
Based on two main branches with infinite lifetime:
○ master — this branch contains production code. Stores official release
history
○ develop — this branch contains pre-production code. Serves as an
integration branch for features
○ It is also convenient to tag all commits in the master branch with a
version number
14. Feature Branch
● Each new feature should reside in its own branch
● Feature branches use develop as their parent branch
● When a feature is complete, it gets merged back into develop
● Features should never interact directly with master
19. Release Branch
● Once develop has acquired enough features for a release, fork a
release branch off of develop
● Creating this branch starts the next release cycle, so no new
features can be added after this point
● Allow many minor bug to be fixed and preparation of meta-data
for a release
● Must merge into master and develop
21. Creating a Release Branch
● Without the git-flow extensions:
○ git checkout develop
○ git checkout -b release/0.1.0
● When using the git-flow extensions:
○ $ git flow release start 0.1.0
○ Switched to a new branch 'release/0.1.0'
22. Finishing a Release Branch
● Without git-flow extensions:
○ git checkout master
○ git merge release/0.1.0
● With git-flow extension:
○ git flow release finish 0.1.0
24. Hotfix Branch
● Used to quickly patch production releases
● Created to act immediately upon an undesired status of master
● Based on master instead of develop
● Only branch that should fork directly off of master
● As soon as the fix is complete, it should be merged into both
master and develop
30. Summary
Gitflow is one of many styles of Git workflows you and your team
can utilize.
Some key takeaways to know about Gitflow are:
● The workflow is great for a release-based software workflow.
● Gitflow offers a dedicated channel for hotfixes to production.
31. Advantages
● Ensures a clean state of branches at any given moment in the life cycle of
project
● The branches naming follows a systematic pattern making it easier to
comprehend
● It has extensions and support on most used git tools
● It is ideal when there it needs to be multiple version in production
32. Disadvantages
● The Git history becomes unreadable
● The master/develop split is considered redundant
● It isn’t recommended when it need to maintain single version in production
33. Overall Flow of Git Flow
● A develop branch is created from master
● Feature branches are created from develop
● When a feature is complete it is merged into the develop branch
● A release branch is created from develop
● When the release branch is done it is merged into develop and master
● If an issue in master is detected a hotfix branch is created from master
● Once the hotfix is complete it is merged to both develop and master