World map

 

BM: Baca dalam Bahasa Melayu

World C1: Pipeline Thinking

Trunk-based work and feature flags

You will learn: how small daily merges and feature flags keep main ready to ship.

Checked with GitHub Actions 2026-10 on 31 Oct 2026

The problem

Git World 6 had a lesson called Trunk-based and feature flags. Now your team merges into main 20 times a day. What must stay true about main?

Pick one answer.

Watch

Tap each point on the timeline.

Small merges, many times a day, each one checked by the belt. That is trunk-based development: Everyone merges small changes into main (the trunk) at least once a day. with CI.

Predict

Ben’s pull request finishes the new checkout. The belt tests it with the switch off and on.

Which station will stop the line? Tap it, then press Run.

What happened on GitHub

Workflow file .github/workflows/ci.yml

name: CI
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
new-checkout: ['off', 'on']
steps:
- uses: actions/checkout@v7
- run: npm ci && npm run lint
- run: npm test
env:
NEW_CHECKOUT: ${{ matrix.new-checkout }}

The line

Pull request · feature → main

A feature flag: An on/off switch in your code that hides unfinished work. is like a covered menu card: cooked, but hidden. Test both sides.

Try it

Ready to merge into main today?

Drag a card into a box. Or tap the card, then tap the box.

      Predict

      The new checkout is on for everyone. Payments start failing. What is the fastest safe fix?

      Pick one answer.

      Check

      Good trunk habit, or needs work? Swipe each one.

      Swipe right for good, left for needs work. Or use the buttons.

      1 / 4

      Run the whole line on every merge to main

      Run the whole line on every merge to main

      You did it!

      You can now keep main ready to ship, every day.

      Go deeper (optional)

      A busy repo can add a merge queue. It tests each pull request with the newest main, then merges it. Each flag adds paths to test. Keep few, and remove old ones. Switching a feature on is a release, not a deploy (World C3).

      Real rep (optional): give a test job a matrix with your flag off and on.