Git workflow — branches, commits, rebase
The core AGENTS.md already states the binding one-liners (prefix gate, lowercase
Conventional Commit subject, --ours/--theirs reversal). This skill is the
exhaustive reference. Nothing here weakens the core — it expands it.
Branch naming
The single rule: a branch name MUST start with a Git Flow prefix. The gate is
the agent reading this — CI, hooks, and the host do not check it.
- Before the very first commit on any newly-created or newly-switched-to branch,
MUST run
git branch --show-current.
- MUST confirm the output starts with one of
feature/, bugfix/, hotfix/,
refactor/, docs/, chore/, release/ (or the project-defined equivalent set).
- Treat every fresh branch as failing the gate until that confirmation is made
explicitly. The gate runs once per branch — re-running it on every commit is
unnecessary; skipping it on the first commit is forbidden.
- Gate fails → MUST rename in place before the first commit lands:
git branch -m <current-name> <prefix>/<3-6-word-slug>.
Renaming after commits land (especially after push) leaks the bad name into history,
the remote, and any open PR/MR. It is forbidden as a workaround for skipping the
pre-first-commit gate.
A bare human-authored slug (add-auth, fix-login) is just as forbidden as an
auto-generated name (opencode/playful-engine, 13-feat-x). The gate rejects shape,
not provenance — "I picked it manually" is not an exemption.
Slug MUST be a 3–6 word human-authored summary — not the full issue title, not the
issue number, not a single word, not a placeholder. Words separated by -.
One task = one branch. Name needs changing → rename it; MUST NOT create a sibling
branch for the same work.
→ Full forbidden-shape table, rename recipes, and the prefix→commit-type table:
references/branch-naming.md.
Commit messages
MUST follow Conventional Commits:
<type>(<scope>)<!>: <description>.
- Subject: lowercase, imperative, no period, ≤50 chars (≤72 max). The ENTIRE
subject MUST be lowercase — no exceptions for acronyms (
mcp, api, jwt, url,
html, css, aws), brand names (figma, github, gitlab, react, vite),
proper nouns, or initialisms. commitlint subject-case: [2, 'always', 'lower-case']
rejects any uppercase character — preserving case for "real" names fails the commit-msg
hook and CI. A token that must appear in canonical case goes in the body (no case
rule), never the subject.
- MUST NOT: emojis, sentence case, trailing periods, vague subjects (
update stuff,
fix things, wip), AI-tool branding (no "Generated with Claude", no 🤖, no
Co-authored-by: trailer naming an AI).
→ Full type table, scope/body/breaking-change rules, trailers, and worked examples:
references/commit-messages.md.
Rebase
Resolve conflicts by intent, not reflex:
- Regenerated / generated artifacts (lockfiles, build outputs, sequence-numbered
migrations, generated configs): take
main's version, then re-run the generator on
top so your additions reproduce on the new base.
- Hand-written code: review both sides and merge intentionally. MUST NOT blindly
pick
--ours or --theirs — that silently drops one side's work.
During a rebase, Git's --ours / --theirs are reversed vs. merge: --ours is
main (the rebase target being replayed onto); --theirs is the feature commit being
applied. Wrong side / wrong direction → git rebase --abort and restart.
MUST NOT continue.
→ Detail: references/rebase.md.
Source: hyperlapse122/dotfiles — distributed by TomeVault.
1---2name: hyperlapse122-dotfiles-git-workflow3description: Git workflow — branches, commits, rebase4---56# Git workflow — branches, commits, rebase78The core `AGENTS.md` already states the binding one-liners (prefix gate, lowercase9Conventional Commit subject, `--ours`/`--theirs` reversal). This skill is the10exhaustive reference. **Nothing here weakens the core — it expands it.**1112## Branch naming1314The single rule: a branch name **MUST** start with a Git Flow prefix. The gate is15the agent reading this — CI, hooks, and the host do **not** check it.16171. Before the **very first commit** on any newly-created or newly-switched-to branch,18 **MUST** run `git branch --show-current`.192. **MUST** confirm the output starts with one of `feature/`, `bugfix/`, `hotfix/`,20 `refactor/`, `docs/`, `chore/`, `release/` (or the project-defined equivalent set).213. Treat **every** fresh branch as failing the gate until that confirmation is made22 explicitly. The gate runs **once per branch** — re-running it on every commit is23 unnecessary; skipping it on the first commit is **forbidden**.244. Gate fails → **MUST** rename in place *before* the first commit lands:25 `git branch -m <current-name> <prefix>/<3-6-word-slug>`.2627Renaming **after** commits land (especially after push) leaks the bad name into history,28the remote, and any open PR/MR. It is **forbidden** as a workaround for skipping the29pre-first-commit gate.3031A bare human-authored slug (`add-auth`, `fix-login`) is **just as forbidden** as an32auto-generated name (`opencode/playful-engine`, `13-feat-x`). The gate rejects **shape,33not provenance** — "I picked it manually" is not an exemption.3435Slug **MUST** be a 3–6 word human-authored summary — not the full issue title, not the36issue number, not a single word, not a placeholder. Words separated by `-`.37**One task = one branch.** Name needs changing → rename it; **MUST NOT** create a sibling38branch for the same work.3940→ Full forbidden-shape table, rename recipes, and the prefix→commit-type table:41[`references/branch-naming.md`](references/branch-naming.md).4243## Commit messages4445**MUST** follow [Conventional Commits](https://www.conventionalcommits.org/):46`<type>(<scope>)<!>: <description>`.4748- **Subject**: lowercase, imperative, no period, ≤50 chars (≤72 max). **The ENTIRE49 subject MUST be lowercase** — no exceptions for acronyms (`mcp`, `api`, `jwt`, `url`,50 `html`, `css`, `aws`), brand names (`figma`, `github`, `gitlab`, `react`, `vite`),51 proper nouns, or initialisms. commitlint `subject-case: [2, 'always', 'lower-case']`52 rejects any uppercase character — preserving case for "real" names fails the commit-msg53 hook and CI. A token that must appear in canonical case goes in the **body** (no case54 rule), never the subject.55- **MUST NOT**: emojis, sentence case, trailing periods, vague subjects (`update stuff`,56 `fix things`, `wip`), AI-tool branding (no "Generated with Claude", no `🤖`, no57 `Co-authored-by:` trailer naming an AI).5859→ Full type table, scope/body/breaking-change rules, trailers, and worked examples:60[`references/commit-messages.md`](references/commit-messages.md).6162## Rebase6364Resolve conflicts by **intent, not reflex**:6566- **Regenerated / generated artifacts** (lockfiles, build outputs, sequence-numbered67 migrations, generated configs): take `main`'s version, then re-run the generator on68 top so your additions reproduce on the new base.69- **Hand-written code**: review both sides and merge intentionally. **MUST NOT** blindly70 pick `--ours` or `--theirs` — that silently drops one side's work.7172During a rebase, Git's `--ours` / `--theirs` are **reversed** vs. merge: `--ours` is73`main` (the rebase target being replayed onto); `--theirs` is the feature commit being74applied. Wrong side / wrong direction → `git rebase --abort` and restart.75**MUST NOT** continue.7677→ Detail: [`references/rebase.md`](references/rebase.md).7879---80> Source: [hyperlapse122/dotfiles](https://github.com/hyperlapse122/dotfiles) — distributed by [TomeVault](https://tomevault.io).81<!-- tomevault:4.0:skill_md:2026-06-23 -->