Git Commit Helper
Generate well-formatted, conventional commit messages based on the staged changes.
Commit Message Format
code
<type>(<scope>): <subject> <body> <footer>
Types
- •feat: New feature
- •fix: Bug fix
- •refactor: Code change that neither fixes a bug nor adds a feature
- •perf: Performance improvement
- •test: Adding or updating tests
- •docs: Documentation changes
- •chore: Maintenance tasks, dependencies
- •style: Code style changes (formatting, semicolons, etc.)
- •ci: CI/CD changes
- •build: Build system or dependencies
Guidelines
- •
Subject Line (max 50 chars)
- •Use imperative mood ("add" not "added")
- •Don't capitalize first letter
- •No period at the end
- •Be concise but descriptive
- •
Body (wrap at 72 chars)
- •Explain WHAT and WHY, not HOW
- •Separate from subject with blank line
- •Include motivation for the change
- •Contrast with previous behavior
- •
Footer
- •Reference issues:
Fixes #123,Closes #456 - •Breaking changes:
BREAKING CHANGE: description
- •Reference issues:
Process
- •Review
git diff --staged - •Identify the primary change type
- •Determine appropriate scope (module, package, component)
- •Generate commit message following the format
- •Ensure message accurately reflects the changes
Example
code
feat(api): add job search endpoint with filters Add new /api/jobs/search endpoint that supports filtering by title, location, salary range, and experience level. Includes pagination support and returns structured JSON. Closes #42