Overview

This hub fixes the branch model for a small team or solo author shipping to main, then points to the page that owns each topic. Branches are short-lived, main is protected and deploys, and every change lands through a pull request.

Treat main as the deploy branch

Never push directly to main; land work through a pull request. Enforce that with a ruleset, not with habit: github-branch-protection has the rules. Tag releases from main when the project ships versions (github-releases); otherwise the latest commit on main is the release.

Use short-lived feature branches

One branch per task, deleted after merge.

  • Prefix by intent: feat/<name>, fix/<name>, and claude/<name> for branches that start in a Claude Code session, so provenance is visible in review.
  • Rebase onto main before opening the PR; do not merge main back into the feature branch.
  • Split a branch that outlives a week; long-lived branches produce painful merges.

Set repository defaults once

Under Settings, General, Pull Requests:

  • Allow squash merging only; turn off merge commits and rebase merging.
  • Turn on “Automatically delete head branches.”
  • Turn on “Allow auto-merge” (see github-pr-workflow).

Under Settings, Actions, set the default GITHUB_TOKEN permission to read-only and request more per workflow (github-actions). Turn on secret scanning and push protection (github-secrets).

Know which page owns what

TopicPage
PR titles, squash, drafts, CODEOWNERS, reviewgithub-pr-workflow
Rulesets and branch protectiongithub-branch-protection
Workflow YAML, caching, permissions, action versionsgithub-actions
Secrets, OIDC, scanninggithub-secrets
Tags, semver, release notesgithub-releases
The gh CLIgithub-cli