Choosing Between git-flow and github-flow

This article was automatically translated from Japanese by AI. Read the original Japanese version →

Table of Contents

tl;dr

  • Use git-flow if your workflow includes QA or release tasks that take 1–2 days or longer.
  • Use github-flow if your workflow is to pass CI and deploy promptly.
  • Until release work (typically QA) begins for your initial version, sticking to github-flow based off the master branch is plenty.
  • Think ahead about your application's release workflow and quality requirements.

Introduction

In application development, two well-known branching models are git-flow and github-flow. Deciding which one to use—or which one suits your team better—is a very common dilemma. In this post, I'll briefly summarize how to think about choosing between them.

I won't explain how git-flow or github-flow themselves work here.

git-flow

git-flow is a workflow suited for situations where releasing takes 1–2 days or even longer.

When bundling several features together to hand off for release, you create a release branch and freeze the code. Release work includes things like QA, release go/no-go meetings (if you have them), or App Store review in the case of iOS apps.

If development on the next version doesn't stop while release work is underway, that ongoing work happens on the develop branch.

github-flow

The fundamental premise of github-flow is developing feature by feature, merging into master, and deploying immediately. github-flow is simpler than git-flow, so the question is whether you can satisfy that premise.

For example, if features A and B are developed separately and you need to run QA covering both together before releasing, github-flow breaks down (note: I'm contrasting that against batching for QA). Essentially, your workflow needs to be one where passing CI tests and developer checks is enough to ship.

If it's a small team where features are rarely developed in parallel, github-flow works just fine.

Other Notes & Edge Cases

Consider a case where you're developing both an iOS app and the API server it talks to.

Because iOS app updates require an App Store review period, the parts of the API server that coordinate with the iOS app (such as API specs) need to follow git-flow. Conversely, changes confined to the server (like bug fixes or minor tuning) can be worked on using github-flow. In that sense, server-only fixes are effectively treated the same as hotfixes in git-flow.

Also, whichever workflow you choose, until the initial version enters release prep, operating like github-flow on top of master is usually enough. That said, if your CI has release-related steps—such as tagging automatically on push to master—it might feel a little awkward having extra jobs fire constantly. If you can live with that, just roll with it.

Take time to think through what kind of QA and tasks are needed to ship a change, and clarify your application's release workflow and quality requirements in advance.

I feel like I may have just stretched out the obvious into a blog post, but I hope someone out there finds it helpful.