Git – Avoiding the Grid of Doomâ„¢ in Git-Flow

gitgitflow

My project follows the Git Flow branching model. Development happens on develop, which is merged into master and tagged there for releases. Hotfixes happen in branches branched off the current master.

However, current development also needs the hotfixes, so each hotfix branch is merged into develop as well.

This creates very ugly revision graphs, especially develop/hotfixes are merged often in a short timeframe:

Ugly revision graph

Is this a problem people usually have with Git-Flow, and is there an easy fix for it?

Best Answer

so your problem is that you're merging every hot fix two or three times? (First to master, then to develop, lastly from develop to master again)?

yeah, that's it! Can't avoid that though, hotfixes have to be merged into develop

Sure, but why merge from develop to master if nothing actually changed?

Take a look at one of those master<-develop<-hotfix merges: there should be no actual change in there (the hotfix was already merged directly to master, after all). If there's no change, just don't do it.

In any case, according to your linked doc, the only merges from develop to master should be going via a release branch. Instead you're keeping master in sync with your (unstable) development branch - don't.

Related Topic