StoicBuilder

HandbookIX the CuriaBranching workflows

IXthe Curia, Work as a team

Branching workflows

1 min readUpdated 28 November

In plain words

A branching workflow is the team's rule for how work reaches main: most web teams use short-lived branches merged through pull requests, so main always works and can be released.

Where you see it

On Harbor's repository, main is protected: nobody pushes to it directly, and a branch like feat/annual-plans merges only after a review and green checks. Three people and two agents work at once, and each branch lives a day or two.

Terminalterminal
git switch main && git pullgit switch -c feat/annual-plans# small commits, pushed at least dailygit fetch origin && git rebase origin/main # stay close to maingh pr create --fill
Branch from a fresh main, keep the branch short, open a pull request. Branch protection on main does the rest.

What goes wrong

  1. Feature branches that live for weeks

    A branch open for three weeks drifts so far from main that merging it becomes a project of its own. Split the work into smaller pull requests, and hide unfinished parts behind a feature flag.

  2. Copying GitFlow because it looks professional

    Separate develop, release and hotfix branches suit software shipped in numbered versions, like a desktop app. For a web app deployed several times a week, short branches off main are usually enough.

  3. Two agents in one folder

    Agents started from yesterday's main, or sharing one working folder, edit the same files and open pull requests that conflict before anyone reads them. Give each agent its own branch from a fresh main, ideally in its own git worktree.

What to tell your agent

Copy this into Lovable, Bolt, Cursor or any agent
Follow our workflow: pull the latest main, create a branch named feat/, fix/ or chore/ plus a short description, and keep the change small enough to review in one sitting. Push it and open a pull request into main, and never push to main directly.

Quick check

Sign in to earn +10 XP for it

Two agents are building different Harbor features at the same time on one laptop. What keeps them from trampling each other's work?

Got a prompt that touches branching workflows?

Paste it. You get a better prompt first, then the cards that explain it.

Check your own prompt

Free, no sign-up.