World map

 

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

main holds Release 2.0, then two half-built commits: map screen and login. They all wobble.

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

Two features, Add map screen and Add login, move from develop into release/2.1.0 for testing. Then version v2.1.0 lands on main next to v2.0.0.

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.

      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

      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.

      1 / 5

      A phone game, released every two months

      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.