Release Management with GitFlow — Part I

Osanda Hemachandra
3 min readOct 23, 2019

--

The GitFlow workflow defines a strict branching model planned and designed around the project release. This gives a robust framework for managing larger projects. Gitflow is ideally appropriate for projects that have a planned(scheduled) release cycle. (release-based software workflow.)

Gitflow was introduced by Vincent Driessen to help simplify development and release management.

key benefits

Git is a distributed version control system for tracking changes in source code during software development. Gitflow is just an abstract idea of a Git workflow. It has attracted a lot of attention because it is very well suited to collaboration and scaling the dev team, and also it includes some other key benefits.

Parallel Development

One of the good things concerning GitFlow is that it makes parallel development very easy, by isolating new development from finished work. Additional development (such as features and non-emergency bug fixes) is done in feature branches and is only merged back into the main body of code once the developer(s) is happy that the code is ready for release.
Although if you’re asked to switch from one task to a different, all you need to do is commit your changes and then create a new feature branch for your new task. Once that task is completed, simply checkout your original feature branch, and you’ll be able to continue wherever you left.

Collaboration

feature branches also make it easier for two or more developers to collaborate on the same feature, because each feature branch is a sandbox where the only changes are the changes necessary to get the new feature working. That makes it very easy to see and follow what each collaborator is doing.

Release Staging Area

As new development is completed, it gets merged back into the develop branch, which is a staging area for all completed features that haven’t yet been released. So when the next release is branched off of develop, it will automatically contain all of the new stuff that has been finished.

Support For Emergency Fixes

GitFlow supports hotfix branches (branches made from a tagged release). You can use these to make an emergency change, safe in the knowledge that the hotfix will only contain your emergency fix. There’s no risk that you’ll accidentally merge in a new development at the same time.

GitFlow WorkFlow

The overall flow (summary) of Gitflow is:

  1. A develop branch is created from master
  2. A release branch is created from develop
  3. feature branches are created from develop
  4. When a feature is complete it is merged into the develop branch
  5. When the release branch is done it is merged into develop and master
  6. If an issue in master is detected a hotfix branch is created from master
  7. Once the hotfix is complete it is merged to both develop and master
Author: Vincent Driessen, License: Creative Commons BY-SA

I hope you got the basic idea about this workflow. About this interesting branching model and also about these new words will be discussed further in the next time.

See you soon in the next article.

--

--

Osanda Hemachandra

Senior Software Engineer @ Sysco LABS | Visiting Lecturer