gh-branches
Branches & History (solo dev)
Branches and merge strategy exist, on a team, to coordinate people — reviews, parallel work, keeping each other unblocked. Solo, none of that applies, so drop the ceremony that only served it. What's left is the part that still pays: a clean, linear, bisectable history you can read and revert months later, and a safe sandbox for work that isn't ready to touch main. Everything below serves those two things — if a practice buys you neither, skip it.
The rule: branch or straight to main?
The default is fast: small, safe, self-contained changes go straight to main; anything real gets a branch and a PR. You're the only one here — the point of a branch isn't process, it's protecting main from a change you can't yet vouch for.
Straight to main when the change is trivial and low-risk and you're confident it's right the moment you write it:
- Typo, wording, or docs fix; a comment; a small config tweak.
- A small, self-contained fix you can verify on the spot.
- The tree is clean, and if CI runs on main it's your safety net.
Branch + PR (mechanics in the gh-prs skill) when the change is anything more:
- A feature, or a fix that spans several files or isn't obviously correct.
- A refactor or migration — anything you might get partway into and abandon.
- Work that won't finish in one sitting, so main shouldn't carry it half-done.
- Anything you want CI to gate, or a diff you'd want to read back before it lands.