My company is using Git, and is using a peculiar branching scheme - work is done in master, and branches are reserved for releases. This works fine, so long as all of the work done in an iteration makes it into the branch, but if a critical production issue comes up, we have to ensure that the work somehow makes it into both branches.

Lately, we've been having some "fun" with those branches. It's been an administrative headache, ensuring that all of the work makes it into every branch, and some bugs which have been fixed on one branch don't make it into master until someone points it out, which is concerning.

I came across Git Flow a while back, and I feel that it would be a solution to our problem - code not percolating all the way to the release, or all the way back down. The only catch is that my lead stated that this sort of development was an anti-pattern - developing furiously for two weeks, then spending three to resolve the merge conflicts.

I'm not entirely sure I agree, and since I brought it up, work has resumed like normal. Only recently have we had some major pain points with this.

I'd like to know - why would this sort of development scheme be seen as an anti-pattern? Is it really an anti-pattern?

  • 1
    The "Rule 3" section from Ted Dziuba's old blogpost might help illustrate how it can be an anti-pattern.
    – Isxek
    Feb 19, 2013 at 5:08
  • 5
    IMO, the more actual time you're spending thinking about version control, the more that's gone wrong with the whole user -> tool phenomenon in the first place. Feb 19, 2013 at 6:06
  • @ErikReppen: I'd like to take everyone's minds away from version control and have a process that everyone can get used to. This way, we don't have to worry about things like if this is an anti-pattern or not.
    – Makoto
    Feb 19, 2013 at 6:09
  • 6
    @Makoto Anything that violates KISS is an anti-pattern, IMO. This is where VCS power users tend to make me crazy. Feb 19, 2013 at 15:50
  • 6
    The term "antipattern" is kind of like "best practice", in that it often serves as an excuse for people to turn their brains off. Don't accept this notion if the lead can't tell you clearly what experience he has with it and why it's bad.
    – Kyralessa
    Feb 19, 2013 at 21:02

2 Answers 2


He's mostly referring to the feature branches side of the model. Feature branches were declared an anti-pattern a long time ago when the branches lasted for months and version control systems couldn't merge to save their life. Feature branches that last a week or two have much fewer issues, especially if you're continually merging from develop into the feature branch during that time. Anything much longer than that is still not recommended.

Even if you don't use the feature branch side of git flow, the other parts are useful in ensuring you get clean merges and your changes are propagated in the right direction.

  • 3
    My experience with feature branches, or the way we've done them, is that there can be heartache with them if they're allowed to live for more than an iteration. A rule that states that all features must be merged into the iteration before release would be nice, to alleviate the heartache of merges - and boy, have we had some serious heartache behind those...
    – Makoto
    Feb 19, 2013 at 6:05
  • 6
    My experience is that you can have local stuff lying around for long as long as you keep it merged with recent master and or develop as appropriate.
    – Jan Hudec
    Feb 19, 2013 at 10:25
  • 2
    @JaHudec ... or until you have two things lying around which are conflicting in some way. You should always have the overview about that being done...
    – johannes
    Feb 19, 2013 at 23:01
  • 5
    Doing a bit of reading up on it, and Martin Fowler's reference seems to indicate that feature branches done in a continuous integration flow can work out - if they're done in smaller bites than what most people would consider doing them for. So, in a sense, you're right - less than two weeks as a time-to-live on a feature branch seems suitable. I don't see, however, how feature branches themselves are the anti-pattern.
    – Makoto
    Feb 20, 2013 at 1:36
  • 3
    You're right. They are only an anti-pattern when they live too long without being merged. Sometimes people still rail against an idea when they don't remember the underlying reasons. Feb 20, 2013 at 2:35

Merging is a funny thing - the less frequently it's done the harder it will be, the harder it is, the more people will be afraid of it, the less frequently they will do it.

Solution is either do not allow branches to deviate too much, or not to use branches.

If people understand this, you will probably have not much problems with merge, if not - may be branches are not a good idea without some education.

  • 1
    Nah, not using branches is a non-starter. The other primary issue would be that work can be done in two different places in the same code, so hopefully we can do something to alleviate that, too.
    – Makoto
    Feb 19, 2013 at 6:06
  • 12
    @makoto, quite often decoupling things in code makes conflicts less frequent. It can be either plain separation of a functionality into functions/classes or more high-level avoiding of undocumented assumptions between modules. Then changes become more localized.
    – maxim1000
    Feb 19, 2013 at 8:21
  • 1
    @maxim1000 I agree. I think someone once said something like "A VCS is a poor man's alternative to modular [decoupled] architecture"
    – 8DH
    Oct 22, 2013 at 8:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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