GitHub flow: small branches, fast merges
The loop most product teams work in: branch from main, pull request, review and checks, merge, deploy. Why small, short-lived branches are safer, what "merged" and "deployed" mean, how feature flags let unfinished work ship hidden, and how to read a feature's progress from the pull request list.
Lesson 10 of 15~35 min of learningIncludes ~22 min for questions and tasks
Contents1 of 63 steps
Alex Tutor
You
Alex Tutor
Alex Tutor
e7c3b19Add summer promo bannere19c3b7Rewrite delivery page copyf02a6d4Update FAQ answers3a9d1c4Reproduce bug in a test8be2f70Add cat treats bundle5c1d7e2Set freeDeliveryFrom to 1000a8f40b9Update delivery page textd36b9c5Update cart hint textfeature/free-delivery-1000b7e4a05Re-enable button after cart edits6f2c8a1Raise free-delivery threshold to 1000 UAH (#133)c90d4e7Merge branch 'main' into content/delivery-copycontent/delivery-copya7d93e4Rewrite delivery page copy (#132)c2d7f90Update checkout hint copyf7a2b61Restore checkout button colour9e3b5d2Merge branch 'main' into fix/checkout-buttonfix/checkout-buttond51c7e8Fix checkout button after cart edits (#134)main
Commit graph, oldest first: main over the last two weeks 1. commit e7c3b19 on main "Add summer promo banner" 2. branch content/delivery-copy starts from commit e7c3b19 3. commit e19c3b7 on content/delivery-copy "Rewrite delivery page copy" 4. commit f02a6d4 on main "Update FAQ answers" 5. branch fix/checkout-button starts from commit f02a6d4 6. commit 3a9d1c4 on fix/checkout-button "Reproduce bug in a test" 7. commit 8be2f70 on main "Add cat treats bundle" 8. branch feature/free-delivery-1000 starts from commit 8be2f70 9. commit 5c1d7e2 on feature/free-delivery-1000 "Set freeDeliveryFrom to 1000" 10. commit a8f40b9 on feature/free-delivery-1000 "Update delivery page text" 11. commit d36b9c5 on feature/free-delivery-1000 "Update cart hint text" 12. commit b7e4a05 on fix/checkout-button "Re-enable button after cart edits" 13. commit 6f2c8a1: feature/free-delivery-1000 squash-merged into main "Raise free-delivery threshold to 1000 UAH (#133)" 14. merge commit c90d4e7: main merged into content/delivery-copy "Merge branch 'main' into content/delivery-copy" 15. commit a7d93e4: content/delivery-copy squash-merged into main "Rewrite delivery page copy (#132)" 16. commit c2d7f90 on fix/checkout-button "Update checkout hint copy" 17. commit f7a2b61 on fix/checkout-button "Restore checkout button colour" 18. merge commit 9e3b5d2: main merged into fix/checkout-button "Merge branch 'main' into fix/checkout-button" 19. commit d51c7e8: fix/checkout-button squash-merged into main "Fix checkout button after cart edits (#134)" (highlighted)
You
Daniel
main is always a version we could put on the site right now. Anything unfinished waits on its own branch, or, as you'll see today, behind a switch.Alex Tutor
main, a pull request, a merge, a deploy. Then the next change starts again from fresh main.Alex Tutor
Question 1
Put the steps of GitHub flow at CatChow in order, from the idea to customers seeing the change.
Tap an item, then tap where it should go. You can also drag or use the arrows.
You
Daniel
main, builds the site and puts it on our servers. That's the deploy. It's a job like build and test, except it runs on main after a merge.Alex Tutor
Fix checkout button after cart edits#134
Merged into main at 9:40 as d51c7e8
deploy (production)
Ran on d51c7e8 in main, finished at 9:44
Deployments section in the right column. Click production to see which commit is live and since when.You
Daniel
main has the change and the site doesn't. We get an alert and either fix it right away or revert. A broken main blocks everyone's next deploy, so it jumps the queue.You
production under Deployments.Alex Tutor
Alex Tutor
Question 2
At CatChow, the moment #134 shows Merged, every customer already sees the fix on the site.
You
Alex Tutor
feature/loyalty-points? Twelve commits ahead, 86 behind, untouched for five months. That's what "merge it once, at the end" tends to turn into.Daniel
main moves on without it. The further behind, the more chances of conflicts, or of a surprise like my checkout button in March.Alex Tutor
Daniel
Revert removes exactly that. Revert a huge one, and ten good changes leave with the bad one.You
Alex Tutor
Alex Tutor
Question 3
Why does CatChow prefer small pull requests on short-lived branches? Select all that apply.
You
Alex Tutor
main it is. Old and far behind is the warning sign.Daniel
Files changed says 60 files for "a small tweak", ask why. A question early is cheaper than a painful review later.Alex Tutor
main kept collecting commits next to it.Alex Tutor
Question 4
Both branches are about to get a pull request. Which statement fits GitHub flow best?
a1w1a2w2a3w3a4w4a5w5feature/wishlista6mainx1fix/footer-links
Commit graph, oldest first: Two branches waiting to be merged 1. commit a1 on main 2. branch feature/wishlist starts from commit a1 3. commit w1 on feature/wishlist 4. commit a2 on main 5. commit w2 on feature/wishlist 6. commit a3 on main 7. commit w3 on feature/wishlist 8. commit a4 on main 9. commit w4 on feature/wishlist 10. commit a5 on main 11. commit w5 on feature/wishlist 12. commit a6 on main 13. branch fix/footer-links starts from commit a6 14. commit x1 on fix/footer-links
You
Alex Tutor
Daniel
main and deployed, but the banner shows only while the flag is on.Alex Tutor
Daniel
autumn-sale-banner, off by default. Emma marked #136 ready for review, I approved it, and she merged it an hour ago.Alex Tutor
Question 5
On Saturday a customer opens the CatChow home page. What do they see?
Add autumn sale banner#136
Merged on Friday · flag autumn-sale-banner: off
deploy (production)
Finished on Friday
You
Alex Tutor
Daniel
main stays deployable while a feature grows in small pull requests.Alex Tutor
You
Alex Tutor
Daniel
Alex Tutor
Alex Tutor
Question 6Short answer · AI-checked task
A marketing colleague writes: "#136 is merged, so the sale banner is live? Can I send the newsletter tonight?" The sale starts on Monday; the flag autumn-sale-banner is off and Emma switches it on at 8:00 on Monday. Write your 2–3 sentence reply.
Write your answer and get a score with feedback from our AI reviewer.
Log in to get AI feedbackYou
Daniel
main in small pull requests, all behind one flag: loyalty-points.Alex Tutor
Daniel
You
Alex Tutor
Question 7Case · AI-checked task
Draft the slice plan for loyalty points in GitHub flow.
Loyalty points: customers earn 1 point for every 10 UAH of a paid order, see their balance in their account, and can spend points as a discount at checkout. Emma writes the page that explains the programme. The old branch feature/loyalty-points is abandoned. The CEO wants the programme "launched before Black Friday", about six weeks away.
Daniel will rebuild it on fresh main, behind the flag loyalty-points. CatChow deploys every merge into main within minutes, and the flag can be switched on for staff only or for everyone.
Write a plan of 4–6 pull requests: what each one contains and in what order, what customers see after each merge, how the team tests before launch, what "launched" means and how to roll back, and what you will watch to report progress.
Write your answer and get a score with feedback from our AI reviewer.
Log in to get AI feedbackAlex Tutor
loyalty label. Filter the pull requests by it, and the feature's progress reads itself.Alex Tutor
Add loyalty points behind a flag#155
by Daniel · merged on Tuesday · flag loyalty-points: off
Earn points on paid orders#156
by Daniel · Review required · checks passed
Write loyalty programme page#157
by Emma · Draft
You
main and on the site, but hidden. One is waiting for a reviewer. Emma's page is still a draft.Daniel
Alex Tutor
You
Alex Tutor
Question 8
Match each thing you can see about loyalty points with what it tells you.
Tap an answer, then tap the row it belongs to. You can also drag.
- #155
Merged, flagloyalty-pointsoff - #156 open, "Review required", checks passed
- #157
Draft - Flag
loyalty-pointsswitched on for everyone
Answers left to place
main always deployable, small branches, a pull request for everything, deploy on merge, and flags for anything that isn't ready for customers.You
Daniel
Alex Tutor
That’s the lesson. You answered every task — nicely done.