8

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?

14
  • 2
    How often are you releasing a new version and are you using hotfix branches only for fixes that can't wait till the next scheduled release? Commented May 8, 2015 at 12:51
  • @BartvanIngenSchenau can be multiple times a day, but usually every couple of days. Hotfix branches only for fixes that can't wait, yes. Commented May 8, 2015 at 12:52
  • 4
    Why are the aesthetics of a revision graph a problem?
    – user40980
    Commented May 8, 2015 at 13:04
  • 1
    Doesn't rebase kind of solve this problem?
    – Cuthbert
    Commented May 8, 2015 at 13:17
  • 1
    @Cuthbert to an extent, but you can't rebase master back onto develop without force-pushing, which is no option. Commented May 8, 2015 at 13:19

1 Answer 1

2

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.