git commit types

Write commits that actually make sense

A quick reference for conventional commit types — keep your git history clean, readable, and professional.

feat New feature

Use when you add a new functionality to the project — a new endpoint, a new screen, a new module.

example feat: add password recovery endpoint
fix Bug fix

Use when you correct an error or unexpected behavior in the existing code.

example fix: correct email validation on signup
docs Documentation

Use for changes only in documentation — README, Swagger, inline comments. No logic is changed.

example docs: update installation steps in README
style Formatting

Use for formatting changes that do not affect the logic — spaces, indentation, removing console.logs.

example style: format code following ESLint rules
refactor Code refactoring

Use when you restructure existing code without fixing bugs or adding features — e.g. switching from require to import.

example refactor: optimize SQL query in user model
chore Maintenance

Use for maintenance tasks — updating dependencies, configuring .gitignore, Docker adjustments.

example chore: update Node.js version in Dockerfile

Commit message structure

type(optional-scope): short description in lowercase