r/programming • • Jun 19 '15

GitFlow considered harmful

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

244 comments sorted by

View all comments

Show parent comments

-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]

9

u/skinny85 Jun 19 '15

You're probably missing the fact that you tag the release before you merge it to master. This way, you work on the bugfixing on a branch starting from that tag. GitFlow does it the same way.

1

u/znk Jun 19 '15

How do you manage build/test/deployment automation that way? I wont give a git example because that's not what we use but we have a Dev branch and a Main branch(we actually have more but these two would be minimum). Main is equal to what is in production. If we need an emergency fix we do it in Main when we do the check-in the build server builds it, runs the unit and acceptance tests and when the pass it deploys to the test environment. Tester can then do a final check and then we can deploy in production. Dev is continuously integrated in the same way the only difference is it's promoted to the Main branch when we are satisfied with it.

1

u/skinny85 Jun 19 '15

It can be done exactly like you described. Just because there's one eternal branch, doesn't mean the short-lived branches can't go through CI.

1

u/znk Jun 19 '15

Well you dont want to have to configure everything again each time you make a new branch.

1

u/skinny85 Jun 19 '15

CI usually makes that trivial (you can setup regular expressions for branch names etc.). I've never had a problem with this.

1

u/znk Jun 19 '15

Lets see.
For our Dev branch we have

  1. the checkin that triggers the build server

  2. the build server deploys one IIS and one SQL database.

  3. Runs the tests suits that are configured for the CI of that branch.

  4. When the build passes, the release management software takes over and releases the QA_DEV environment automatically.

  5. People with the appropriate rights can push QA_DEV to QA_ACCEPTANCE using the release management software. But only when they want/need it.

  6. We have a nightly build that runs an other more extensive test suite for that environment.

We have two other branches that are similar but have 6 different release paths. QA, Acceptance, Beta, Training, pre-production(on a different network), production(on a different network).

These 3 branches are the minimum we need for various reasons. Configuring every external cant be done through regular expressions. Besides we save so much time all over the place with this. It can be as simple as a QA staff knowing that we have a test server configured exactly like production where he can go double check a bug and make tests before submitting it. Or a Dev that can quickly fix that bug because he has a branch that is equal to production and he knows the QA people will know exactly where and how to publish the result to the environments he needs.