Git flow - minimizing overhead

Posted by: 
Dominique De Cooman

Branching and merging with git is one the features that make it worth to use git. Having a successful branching model is key to be able to respond to everyday needs.

Why create the overhead? The simple use case when a project is in production and new features are being developed requires that you have a work flow that allows introducing fixes without having to release the entire development code. You dont want to wait for a stable release of all features currently in development. Read all about it here http://nvie.com/posts/a-successful-git-branching-model/

To minimize the overhead we can something called git flow. Its command provide a great relief. For example, initializing your repo:

git flow init

Creates a develop branch, a master, and prefixes for features, support and hot fixes.

creating a feature branch with:

git flow feature start homepage

This will automatically create a branch, get you on it.

Finishing a branch with:

git flow feature finish

Will merge the feature into develop, remove the feature branch and set you to develop.

The same logic is applied for release branches where it will merge with the master and back to develop. This way the master branch can not ahead of develop.

Hot fix branches allow you to merge into develop and into the master so you can fix things and deploy directly to production.

Install git flow
https://github.com/nvie/gitflow#readme
https://github.com/nvie/gitflow/wiki/Linux

Install git flow complete
https://github.com/bobthecow/git-flow-completion#readme

Git flow remote
http://www.scottw.com/setting-up-git-flow-remote

Continous integration
How about merging this work flow into your Continous integration process? What can be done is that on development we test the development branch continuously every time we do a merge on it. Read the next blog post on using git flow in your continuous integration process.

Add new comment