Commit Changes
Create commits following the Conventional Commits specification.
Format
code
<type>(<scope>): <subject> <body>
Types
- •
feat: New feature - •
fix: Bug fix - •
docs: Documentation only - •
style: Formatting, no code change - •
refactor: Code change that neither fixes a bug nor adds feature - •
test: Adding or updating tests - •
chore: Build process, auxiliary tools, libraries
Rules
- •Subject line: imperative mood, lowercase, no period, max 50 chars
- •Body: explain why not what (the diff shows what)
- •Wrap body at 72 characters
- •Reference issues when relevant: "Fixes #123"
Process
- •Run
git statusandgit diff --stagedto understand changes - •If nothing staged, stage relevant files with
git add - •Determine appropriate type and scope from the changes
- •Write commit message following the format
- •Do NOT add "Generated by Claude" or co-author lines
Examples
code
feat(pubsub): add message timestamp to publisher Include ROS2 clock timestamp in published messages to enable message ordering and latency measurements.
code
fix(subscriber): handle empty message gracefully Previously crashed on empty string. Now logs warning and continues.