BM: Baca dalam Bahasa Melayu
World 6: Team Workflows
Git Flow
You will learn: the five Git Flow branches, and when a team needs them.
The problem
Your phone game ships every two months. Version 2.0 is live. Main already holds half-built 2.1 work. Now 2.0 crashes. How do you fix it?
Watch
Tap each point on the timeline.
Git Flow: A workflow with main, develop, feature, release and hotfix branches. spreads work over five kinds of branch. Two live forever: main and develop. The rest come and go. Tap to follow version 2.1.
Watch
Features done? Start a release branch: A branch where the next version gets its last checks before it ships. from develop. Testers check it there. Then it merges into main, with a version tag.
Try it
Where does each branch start? Sort them.
Drag a card into a box. Or tap the card, then tap the box.
Hint
Ask: is it new work, or a fix for the live version?Predict
Back to the crash. 2.0 is live and 2.1 is half built. Where do you start the fix?
Pick one answer.
Check
Put the whole hotfix in order.
First step at the top. Put these in order. Use the arrows, or drag.
- Merge into develop too
- Branch hotfix/2.0.1 from main
- Tag it v2.0.1
- Fix the crash and commit
- Delete the hotfix branch
- Merge into main
Hint
Two merges: main first, then develop.Check
Is Git Flow a good fit? Swipe right if yes, left if not.
Swipe right for good, left for needs work. Or use the buttons.
A phone game, released every two months
You did it!
You can now explain Git Flow and when it fits.
Go deeper (optional)
The author of Git Flow added a note in 2020. Web apps that ship all the time may not need it. He suggests something simpler, like GitHub Flow. Git Flow still suits software with numbered versions. Git’s own project uses a different model. Read gitworkflows to see it.
Bahasa Melayu
Game telefon anda keluar setiap dua bulan. Versi 2.0 dah live. Main pula dah ada kerja 2.1 yang separuh siap. Tiba-tiba 2.0 rosak. Macam mana nak baiki?
Git Flow sebarkan kerja ke lima jenis branch (cabang). Dua kekal selamanya: main dan develop. Yang lain datang dan pergi. Ketik untuk ikut versi 2.1.
Ciri dah siap? Mulakan release branch dari develop. Penguji semak di situ. Kemudian ia merge ke main, dengan tag versi.
Setiap branch bermula dari mana? Susun.
Balik kepada masalah tadi. 2.0 dah live dan 2.1 separuh siap. Di mana anda mula baiki?
Susun seluruh langkah hotfix ikut turutan.
Git Flow sesuai tak? Leret ke kanan kalau ya, ke kiri kalau tidak.
Kini anda boleh terangkan Git Flow dan bila ia sesuai.
You finished this before. Practice is always welcome!
Official docs: gitworkflows · git merge · A successful Git branching model (Git Flow)
You've learned for 25 minutes. A short break helps your brain.
Sprint done! Great focus. Stretch for a minute?