GitHub Flow vs GitFlow
Fast recall
Quick revision
Core answer
Whether the candidate understands that GitHub Flow is a deliberate continuous-delivery model, not just GitFlow with branches removed, and can name the trade-offs (CI strength, feature flags) that make it work
Treating GitHub Flow as 'GitFlow-lite' and keeping feature branches alive for weeks, which reintroduces the merge pain the model is designed to avoid
Explain that GitHub Flow pushes the safety net onto automated tests and feature flags, and that the choice between the two workflows is driven by release cadence — continuous deploy vs scheduled releases
Interview-ready guide
Interview answer
GitHub Flow is a lightweight workflow built around one rule: the main branch is always deployable.
When I need to add a feature or fix a bug, I branch off main, make small commits, and push the branch. Then I open a pull request so my team can review it, and while it's open our CI pipeline runs all the tests and builds the app. Teammates leave comments, I address them with more commits, and once everyone approves and CI is green, I merge into main.
At that point our deployment pipeline ships the code to production automatically, usually within minutes, and then I delete the branch. The whole thing takes hours or a day, not weeks. The big difference from GitFlow is simplicity: there's no develop branch, no release branches, and no hotfix branches.
Every change follows the same path — branch, pull request, review, merge, deploy. That works really well for web apps and microservices that deploy continuously.
The trade-off is less release-branch structure, so the team needs an explicit testing and deployment policy. Feature flags are one optional way to release behavior later. So if I'm building something big, I'd merge small pieces daily behind a flag, and flip the flag on once it's ready.
GitFlow makes more sense when you ship on a schedule, need formal QA gates, or support several versions at once.
GitHub Flow vs GitFlow
Direct Answer
GitHub Flow keeps one default branch and uses short-lived topic branches proposed through pull requests; accepted changes are deployed according to the project's release process. GitFlow adds long-lived development and temporary release/hotfix branches for a more staged release model. CI, required reviews, feature flags, and automatic deployment are useful policies but not definitions guaranteed by either workflow.
Common Mistakes & Pitfalls
- Treating it as GitFlow-lite: the simplicity is the point — it optimizes for fast feedback, not scheduled releases.
- Long-lived feature branches: branches that live for weeks recreate the merge pain GitHub Flow avoids. Slice work into small PRs or hide it behind a flag.
- Weak or missing CI: merging straight to
mainwith no automated tests is shipping without brakes — GitHub Flow leans entirely on CI to catch regressions.
Check your understanding
Answer these without looking back at the article.
- What is trunk-based development and how does it compare to GitHub Flow?
- How do feature flags let you merge incomplete features to main safely?
- Why does GitHub Flow depend so heavily on continuous integration?
Looking for a structured roadmap?
Every module on this page is also part of the full Java backend interview track.