BM: Baca dalam Bahasa Melayu
World 6: Team Workflows
Name your branches well
You will learn: how to name a branch so the team knows what is inside.
The problem
Tap every branch name that tells you nothing.
0 of 5 found
Your team has six branch: A storyline of commits. Each branch has a name, like main.. One of them fixes the login bug. Which one? Nobody can tell.
Watch
A good name starts with a type and a slash. Then comes a short summary. Use lowercase words joined by dashes.
Try it
Pick the right type for each change.
Drag a card into a box. Or tap the card, then tap the box.
Hint
New for users? feature/. Broken? fix/. Only words? docs/.Try it
Judge each name. Swipe right if it is good, left if it needs work.
Swipe right for good, left for needs work. Or use the buttons.
feature/dark-modeTry it
Issue 42: a typo on the login page. Build the command that starts its branch.
Tap the pieces in the right order.
Hint
A typo is a fix. Start the name with fix/.Check
Git refuses one of these branch names. Which one?
Pick one answer.
You did it!
You can now give branches clear, useful names.
Go deeper (optional)
Many teams add the issue number, like fix/42-login-typo. Some add a name, like aiman/fix-login. Agree on one style. Write it in CONTRIBUTING.md. Git also refuses ~ ^ : ? * [ and a backslash. A branch name cannot start with a dash.
Bahasa Melayu
Pasukan anda ada enam branch (cabang). Salah satunya baiki bug log masuk. Yang mana satu? Tiada siapa tahu.
Nama yang bagus bermula dengan jenis dan garis condong. Kemudian ringkasan pendek. Guna huruf kecil, perkataan disambung dengan sengkang.
Pilih jenis yang betul untuk setiap perubahan.
Nilai setiap nama. Leret ke kanan kalau bagus, ke kiri kalau perlu dibaiki.
Issue 42: salah ejaan di halaman log masuk. Bina arahan untuk mulakan branch-nya.
Git tolak salah satu nama branch ini. Yang mana?
Kini anda boleh beri nama branch yang jelas dan berguna.
You finished this before. Practice is always welcome!
Official docs: git check-ref-format (name rules) · git switch · git branch
You've learned for 25 minutes. A short break helps your brain.
Sprint done! Great focus. Stretch for a minute?