Git flow: develop, release and hotfix branches
The release-oriented branching model: long-lived main and develop, feature, release and hotfix branches, and tags on main. When it fits (app store releases, several supported versions), why many web teams moved to GitHub flow or trunk-based development, and how to recognise each model from a branch list.
Lesson 11 of 15~34 min of learningIncludes ~22 min for questions and tasks
Contents1 of 61 steps
You
Alex Tutor
Daniel
Alex Tutor
main and develop, plus three kinds of temporary ones.Alex Tutor
2c71a0eVersion 2.7.0v2.7.04d8e2b1Update translations7a3f9c2Add reminder settingsc5e0d38Fix crash on loginhotfix/2.7.1e8b2f14Merge hotfix/2.7.1v2.7.10f6c3a9Merge hotfix/2.7.1 into develop91be4d7Send reminder notificationsfeature/workout-reminders5b9d7e2Merge feature/workout-remindersa4c1e86Bump version to 2.8.03e7f0b5Fix reminder text on small screensrelease/2.8.06d2a9f3Merge release/2.8.0mainv2.8.0b8e4c71Merge release/2.8.0 into developdevelop
Commit graph, oldest first: Git flow in a mobile app team 1. commit 2c71a0e on main "Version 2.7.0", tagged v2.7.0 2. branch develop starts from commit 2c71a0e 3. commit 4d8e2b1 on develop "Update translations" 4. branch feature/workout-reminders starts from commit 4d8e2b1 5. commit 7a3f9c2 on feature/workout-reminders "Add reminder settings" 6. branch hotfix/2.7.1 starts from commit 2c71a0e 7. commit c5e0d38 on hotfix/2.7.1 "Fix crash on login" (highlighted) 8. merge commit e8b2f14: hotfix/2.7.1 merged into main "Merge hotfix/2.7.1", tagged v2.7.1 9. merge commit 0f6c3a9: hotfix/2.7.1 merged into develop "Merge hotfix/2.7.1 into develop" 10. commit 91be4d7 on feature/workout-reminders "Send reminder notifications" 11. merge commit 5b9d7e2: feature/workout-reminders merged into develop "Merge feature/workout-reminders" 12. branch release/2.8.0 starts from commit 5b9d7e2 13. commit a4c1e86 on release/2.8.0 "Bump version to 2.8.0" 14. commit 3e7f0b5 on release/2.8.0 "Fix reminder text on small screens" 15. merge commit 6d2a9f3: release/2.8.0 merged into main "Merge release/2.8.0", tagged v2.8.0 16. merge commit b8e4c71: release/2.8.0 merged into develop "Merge release/2.8.0 into develop"
You
Alex Tutor
main holds only released versions, and every commit on it gets a tag: v2.7.0, v2.7.1, v2.8.0. develop is where the next version is assembled. The original article called the first one master.Daniel
feature/* for each feature, release/* to prepare one version, hotfix/* for an urgent fix to what users already have.develop as its own loop. That's what the original model recommends.Alex Tutor
Question 1
Match each git flow branch with its job.
Tap an answer, then tap the row it belongs to. You can also drag.
maindevelopfeature/workout-remindersrelease/2.8.0hotfix/2.7.1
Answers left to place
You
develop, not into main. Does that mean users get it?Daniel
develop means "in the next version". Workout reminders were merged in the middle of a sprint and reached people's phones almost two weeks later.Alex Tutor
You
Daniel
Alex Tutor
Alex Tutor
Question 2
In git flow, once feature/workout-reminders is merged into develop, users who update the app get workout reminders.
m1mainv2.7.1d1f1Add reminder settingsf2Send reminder notificationsfeature/workout-remindersd2develop
Commit graph, oldest first: The day reminders were merged 1. commit m1 on main, tagged v2.7.1 2. branch develop starts from commit m1 3. commit d1 on develop 4. branch feature/workout-reminders starts from commit d1 5. commit f1 on feature/workout-reminders "Add reminder settings" 6. commit f2 on feature/workout-reminders "Send reminder notifications" 7. merge commit d2: feature/workout-reminders merged into develop (highlighted)
Alex Tutor
develop holds enough for the next version, someone cuts a release branch from it: release/2.8.0. From that moment it's a separate lane.Daniel
Alex Tutor
develop stays open, so new features for 2.9.0 keep arriving. When the release is ready, it's merged into main, tagged v2.8.0, and merged back into develop so its fixes aren't lost.You
develop a day after the cut?Daniel
Alex Tutor
You
Daniel
develop rides the next train, unless it's urgent enough for a hotfix.Alex Tutor
Question 3
Which features reach users in version 2.8.0?
m1v2.7.0d1x1Add dark themefeature/dark-moded2y1Add daily step goalsfeature/step-goalsr1Bump version to 2.8.0d3developr2Fix dark theme coloursrelease/2.8.0m2mainv2.8.0
Commit graph, oldest first: Two features and one release branch 1. commit m1 on main, tagged v2.7.0 2. branch develop starts from commit m1 3. commit d1 on develop 4. branch feature/dark-mode starts from commit d1 5. commit x1 on feature/dark-mode "Add dark theme" 6. merge commit d2: feature/dark-mode merged into develop 7. branch feature/step-goals starts from commit d2 8. commit y1 on feature/step-goals "Add daily step goals" 9. branch release/2.8.0 starts from commit d2 10. commit r1 on release/2.8.0 "Bump version to 2.8.0" 11. merge commit d3: feature/step-goals merged into develop 12. commit r2 on release/2.8.0 "Fix dark theme colours" 13. merge commit m2: release/2.8.0 merged into main, tagged v2.8.0 (highlighted)
You
Daniel
hotfix/2.7.1 straight from main, from the v2.7.0 tag, fixed only that, and shipped it in two days.Alex Tutor
develop, which is full of unreleased work. It's merged into main with a new tag, v2.7.1, and into develop, so the next release doesn't bring the crash back.Daniel
develop. It reaches develop when the release is merged back.You
Daniel
develop. Forget the merge back, and version 2.8.0 crashes on login again. I've seen it happen once. Once was enough.Alex Tutor
Question 4
Put the hotfix for the login crash in version 2.7.0 in order.
Tap an item, then tap where it should go. You can also drag or use the arrows.
Alex Tutor
You
Alex Tutor
develop mostly adds waiting and double merges. Many web teams moved to GitHub flow or to trunk-based development: everyone merges small changes into main at least daily, with flags hiding what isn't ready.Daniel
You
Daniel
Alex Tutor
Question 5
Which team is the most natural fit for git flow?
Alex Tutor
Alex Tutor
develop
Default · updated today
main
Updated 9 days ago · tag v2.8.0
release/2.9.0
Updated yesterday · 3 ahead of develop
feature/step-goals
Updated 2 hours ago · pull request into develop
hotfix/2.8.1
Updated 1 hour ago · pull request into main
develop next to main, plus release/… and hotfix/… names: git flow. Often develop is even the default branch, so new pull requests target it.Daniel
main and a few fresh fix/… or feature/… branches with pull requests: GitHub flow, like us. Almost nothing but main, branches that live hours, lots of flags: trunk-based.You
develop as the default, a release branch and a hotfix at the same time.Alex Tutor
Question 6
Match each repository's branch list with the model it most likely uses.
Tap an answer, then tap the row it belongs to. You can also drag.
main,develop(default),release/3.2.0,hotfix/3.1.2, severalfeature/…mainplusfix/cart-roundingandcontent/faq-refresh, each a few days old with a pull request intomain- Only
mainand branches a few hours old; unfinished work hidden behind flags
Answers left to place
Alex Tutor
Daniel
You
Alex Tutor
Alex Tutor
Question 7Short answer · AI-checked task
You are the PM on Daniel's old app team. feature/workout-reminders was merged into develop on Tuesday. release/2.8.0 is cut next Monday, tested for a week, then submitted to the stores (review usually takes a day or two). Marketing asks: "Reminders are merged, can we announce them this Friday?" Reply in 2–3 sentences.
Write your answer and get a score with feedback from our AI reviewer.
Log in to get AI feedbackYou
Alex Tutor
Daniel
develop. The "what changed" part is next lesson: tags and release notes.Alex Tutor
Alex Tutor
Question 8Case · AI-checked task
Write a short recommendation to the CEO: should CatChow switch to git flow?
The CEO heard that a friend's company "releases once a month with a develop branch" and says it sounds safer. He asks whether CatChow should do the same.
What you know about CatChow: one website, one live version; GitHub flow with short branches; every merge into main is deployed within minutes; main is protected (pull requests only, at least one approval, required checks build and test, branches up to date before merging); every pull request gets a preview; feature flags hide unfinished work (the autumn banner went live on time on Monday). In March a bad merge was reverted within ten minutes. Nobody can currently say which version is live, and there are no release notes.
Write 6–10 lines: your recommendation, what git flow would change, when it would make sense, and how to address the CEO's real concern.
Write your answer and get a score with feedback from our AI reviewer.
Log in to get AI feedbackYou
develop.Daniel
v1.4.0 means.Alex Tutor
That’s the lesson. You answered every task — nicely done.