| name | git-workflow |
| description | Enforce clean Git workflow — conventional commits, branch naming, PR etiquette, and release tagging. |
Git Workflow
Standardised Git workflow for team and solo projects. Conventional commits, protected branches, clean history.
Branch Naming
feat/my-feature # New feature
fix/bug-description # Bug fix
chore/task-name # Maintenance
docs/update-readme # Documentation
refactor/area # Code refactor
test/feature-name # Tests only
Conventional Commits
Format: <type>(<scope>): <description>
| Type | When to use |
|---|
feat | New feature |
fix | Bug fix |
docs | Documentation only |
style | Formatting, no code change |
refactor | Restructuring, no feature/fix |
test | Adding or updating tests |
chore | Build, CI, deps, tooling |
perf | Performance improvement |
ci | CI/CD changes |
revert | Revert a previous commit |
Examples:
feat(auth): add JWT refresh token
fix(api): handle 429 rate limit response
docs(readme): update installation steps
refactor(hooks): extract useDebounce hook
chore(deps): upgrade React 18 → 19
Commit Message Rules
- Subject line: 72 chars max, imperative mood
- No full stop at end of subject
- Body: wrap at 72 chars, explain why not what
fix(auth): handle expired refresh tokens
Previously, expired refresh tokens caused a 500 error.
Now returns 401 with a specific error code so the
client can redirect to login.
Closes #142
Branch Protection
git config branch.main.protected true
gh api repos/{owner}/{repo}/branches/main/protection \
-X PUT -f required_status_checks='{"strict": true, "contexts": ["ci"]}' \
-f enforce_admins: true \
-f required_pull_request_reviews='{"required_approving_review_count": 1}'
Tagging Releases
git tag -a v2.1.0 -m "Release v2.1.0 — see CHANGELOG.md"
git push origin v2.1.0
git tag --sort=-version:refname | head -10
git tag -d v2.0.0
git push origin --delete v2.0.0
Useful Aliases
git config --global alias.lg "log --oneline --graph --decorate --all"
git config --global alias.undo "reset --soft HEAD~1"
git config --global alias.main "checkout main"
git commit --amend --no-edit
See Also
github-ops skill — full repo lifecycle
github-actions skill — CI/CD setup
conventional-changelog — auto-generate changelogs