Adopting Semantic Git Commit Messages in My Private Projects
I use semantic Git commits “type: summary” to keep history clear, changelogs easy, and commits focused, using types like feat, fix, docs, refactor, and perf.
By achim Published: 12/25/2025
gitcommit
I’ve started using semantic Git commit messages for my private projects. It brings clarity to the history, makes changelogs easier to generate, and helps collaborators (including future me) understand the intent of each change at a glance.
Here’s the convention I follow:
| Type | Explanation |
|---|---|
| feat | Introduces a new user-facing feature. |
| fix | Patches a bug without adding features. |
| docs | Changes only documentation. |
| style | Formatting or lint-only changes; no logic impact. |
| refactor | Code restructuring without behavior changes. |
| perf | Improves performance without changing features. |
| test | Adds or updates tests only. |
| build | Affects build system or external dependencies. |
| ci | Changes to CI configuration or scripts. |
| chore | Maintenance tasks that don’t affect app code behavior. |
| revert | Reverts a previous commit. |
The header format I use:
- type: and short summary here
Body and footer (optional):
- Body: what and why, not how
- Footer: references (e.g., issues, breaking changes)
Examples:
- feat: add email-based login with magic links
- fix: prevent draft posts from appearing in sitemap
- docs: clarify local setup and environment variables
- refactor: extract repository layer for post queries
- chore: bump SvelteKit and Supabase client to latest
Guidelines I try to follow:
- Keep the header under ~72 characters.
- Use the imperative mood in the summary (add, fix, update).
- One logical change per commit; avoid mixing unrelated changes.
- Prefer a body when context isn’t obvious - especially for refactor, perf, or build commits.
- If something breaks public APIs or behavior, explicitly mark it in the footer with BREAKING CHANGE.
Why this helps me:
- Faster code reviews and easier git blame.
- Clean(er) release notes when paired with conventional-changelog or similar tooling.
- Better personal discipline: smaller, focused commits that tell a coherent story.