Claude-kit git-workflow
Branch, PR, and merge conventions — how to manage code changes from branch creation through merge
install
source · Clone the upstream repo
git clone https://github.com/ryypow/claude-kit
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ryypow/claude-kit "$T" && mkdir -p ~/.claude/skills && cp -r "$T/base/skills/git-workflow" ~/.claude/skills/ryypow-claude-kit-git-workflow && rm -rf "$T"
manifest:
base/skills/git-workflow/SKILL.mdsource content
Overview
This skill covers the full lifecycle of a code change through git: creating a branch, making commits, opening a PR, and merging. It applies to any project using git, regardless of language or domain.
Branch Strategy
Branch naming
feature/<scope>/<description> — new functionality fix/<scope>/<description> — bug fixes chore/<description> — maintenance, dependencies, CI
- Lowercase, hyphen-separated:
feature/auth/add-oauth-flow - Keep it short but descriptive — someone should understand the branch purpose from the name
is optional but recommended for larger repos<scope>
When to branch
- Every change gets its own branch — no committing directly to
ormaindev - Branch from the integration branch (
ordev
depending on the project)main - Keep branches short-lived — merge within days, not weeks
Commit Conventions
Conventional Commits format
type(scope): short description [optional body] [optional footer]
Types:
| Type | When to use |
|---|---|
| New functionality visible to users |
| Bug fix |
| Code change that neither fixes a bug nor adds a feature |
| Adding or updating tests |
| Documentation only |
| Maintenance — dependencies, tooling, CI config |
| CI/CD pipeline changes |
| Performance improvement |
| Formatting, whitespace, semicolons — no logic change |
Rules:
- Subject line: imperative mood, under 72 characters, no trailing period
- Body: explain what and why, not how. Wrap at 80 characters.
- Footer:
,Closes #123
,Refs #456BREAKING CHANGE: description
Good commit messages
feat(auth): add OAuth2 login flow Adds Google and GitHub OAuth2 providers. Users can link multiple providers to a single account. Sessions are stored in Redis with a 24-hour TTL. Closes #142
Bad commit messages
fix stuff updated code WIP changes
Pull Request Workflow
Before opening a PR
- Rebase on the latest integration branch to avoid conflicts
- Run tests locally — don't rely on CI to catch basic failures
- Review your own diff — read it as if someone else wrote it
- Check that no secrets, debug code, or unrelated changes are included
PR description
Every PR needs:
## What changed [1-3 sentences] ## Why [What problem this solves] ## Changes - [Specific changes, bulleted] ## Testing - [How it was tested]
Review and merge
- Address all review comments before merging
- Prefer squash merge for feature branches (clean history)
- Prefer merge commit for long-running branches (preserve context)
- Delete the branch after merge
When NOT to apply this skill
- If the project has its own documented git conventions, follow those instead
- If working in a monorepo with specific tooling (Nx, Turborepo), defer to that tooling's conventions