World map

 

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

Four vague branch names fade out. Clear ones appear: feature/search-box, fix/login-button, docs/setup-guide and chore/update-tools.

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.

        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.

        1 / 7feature/dark-mode
        feature/dark-mode

        Try it

        Issue 42: a typo on the login page. Build the command that starts its branch.

        Tap the pieces in the right order.

        …

        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.