Skip to content

Branch workflow

Branches are named after the work they contain, never after the person, coding agent, or tool that creates them.

This page owns branch names and lifecycle mechanics. Read agent workflows for required preflight, authorization, batch commits, the two allowed paths to main, and remote-branch cleanup.

Create a branch

Start from an up-to-date main and use <type>/<short-description>:

bash
git switch main
git pull --ff-only
git switch -c feat/weekly-overview
TypePurposeExample
featUser-facing functionalityfeat/weekly-overview
fixBug fixfix/reminder-timezone
docsDocumentation onlydocs/vitepress-refresh
refactorInternal restructuringrefactor/reminder-scheduler
testTest-only worktest/release-api-errors
choreMaintenance/dependencieschore/update-flutter
ciCI automationci/cache-flutter-sdk
buildBuild or packagingbuild/linux-package
perfPerformance workperf/habit-list-rendering
releaseRelease preparationrelease/1-4-0
hotfixUrgent production correctionhotfix/download-redirect

Use lowercase kebab-case. With an issue identifier, use a name such as fix/HAB-123-reminder-timezone.

Forbidden names

Never add creator, assistant, vendor, or username prefixes:

text
codex/feat/dynamic-reminders   # invalid
claude/fix/reminders           # invalid
ai/update-docs                 # invalid
marius/new-feature             # invalid
feat/dynamic-reminders         # valid

Avoid vague names including changes, work, test, new-feature, or final-fix-2.

Maintain and finish

  • Keep one coherent concern per branch.
  • Commit logical, reviewable steps.
  • Before a new task, inspect status, run git fetch --all --prune --tags, update main with git pull --ff-only origin main, then create the task branch from that base.
  • Bring current main into an existing branch only under the pull request merge policy or with explicit owner direction; do not perform a hidden merge or rebase.
  • Avoid renaming a published branch; coordinate it if necessary.
  • After a remote branch is deleted, prune and delete its matching local branch after confirming it is not current, checked out elsewhere, or still needed.

Check the current name with git branch --show-current. Rename an unpublished branch with git branch -m docs/descriptive-name.

Released under the MIT License.