r/programming • • Jun 19 '15

GitFlow considered harmful

http://endoflineblog.com/gitflow-considered-harmful
13 Upvotes

244 comments sorted by

View all comments

0

u/[deleted] Jun 19 '15

[deleted]

-3

u/skinny85 Jun 19 '15

Post author here.

Keeping the release branch is not needed, as it's always merged back to master, so after the merge it's just junk in the repo. GitFlow does it exactly the same.

0

u/[deleted] Jun 19 '15

[deleted]

2

u/juliob Jun 19 '15

Isn't there the idea being the hotfixes in GitFlow?

If you merged your "v2" branch back into master, your master is now "v2". If someone finds a problem in the current release, you start a hotfix branch from master to solve it. Once you close your hotfix, GitFlow merges it back into master and into develop.

(AFAIK, there are two different versions of the GitFlow script floating around. Not sure if "hotfix" is a concept in only one of them or both.)

0

u/[deleted] Jun 19 '15

[deleted]

2

u/juliob Jun 20 '15

In the GitFlow flow, things happen like this:

  • master is your stable release (or, at least, as stable as your tests say so)

  • develop is your integration branch and is a child of master. Usually, people plug their CI here on ever commit (which happens when someone merges a feature branch back).

  • featture/* are your feature branches. Their parent is develop.

So, once you finished your development and are ready to make a release, GitFlow will merge the develop branch back into master. That's when you tag something as done.

If, by any chance, there is something wrong with your release, you start a hotfix branch. Hotfixes are child branches of master, so you fix, run your tests, make sure everything is ok and then closes the hotfix, which will merge that branch back to master and forward the changes to develop.

Again, the idea behind GitFlow is that "master" is always the stable release.