Unified commit style for all project contributors. Follows Conventional Commits specification.
- Primary language: Russian
- If language is not specified, use Russian
- For AI-generated commits, Russian is mandatory unless task explicitly sets
lang:en - English is allowed only by explicit instruction (
lang:en) or external collaboration requirements - Do not mix languages in free-text parts of one commit message (subject + body + footer)
- Conventional Commit
type(scope)stays in English - Technical terms (PostgreSQL, SQL, DWH, DDL, DML) keep as-is
<type>(<scope>): <short description>
- Maximum header length: 72 characters
- For Russian subject, use result form (e.g. "добавлено", "исправлено", "обновлено")
- For English subject, use imperative present form (e.g. "add", "fix", "update")
- For English subject, do not use past forms (e.g. "added", "fixed", "updated")
- No trailing period
- Keep subject specific; avoid vague messages like "update", "fix bug", "changes"
| Type | Description |
|---|---|
feat |
New feature |
fix |
Bug fix |
refactor |
Code restructuring without behavior change |
docs |
Documentation only |
test |
Tests, checks, validations |
chore |
Maintenance (configs, scripts, hooks) |
ci |
CI/CD changes |
perf |
Performance optimization |
revert |
Revert previous commit |
| Scope | Used for |
|---|---|
sql |
SQL scripts in dwh-modeling/sql/ |
modeling |
DWH modeling docs, articles, schemas in dwh-modeling/ |
bookings |
Docker PostgreSQL demo in postgres-bookings/ |
docs |
Documentation, README, guides |
data |
Data files (CSV, fixtures) |
For non-trivial changes, body is required. Use bullet points for readability.
Body is considered required when at least one condition is true:
- behavior or API/contract changed
- migration, rollback risk, or compatibility impact exists
- more than one meaningful file/module changed
- fix is non-obvious from header alone
- Do not pass body as one quoted string with
\n(it will be stored literally). - Use multiple
-mflags, or-Fwith heredoc.
Correct:
git commit \
-m "feat(sql): добавлена валидация данных для DWH" \
-m "- Зачем:
- нужна проверка целостности перед загрузкой
- Что:
- добавлен скрипт 04_validation.sql
- добавлены проверки на NULL и уникальность
- Проверка:
- psql -f dwh-modeling/sql/04_validation.sql"Also correct:
git commit -F- <<'MSG'
feat(sql): добавлена валидация данных для DWH
- Зачем:
- нужна проверка целостности перед загрузкой
- Что:
- добавлен скрипт 04_validation.sql
- добавлены проверки на NULL и уникальность
- Проверка:
- psql -f dwh-modeling/sql/04_validation.sql
MSG<type>(<scope>): <краткое описание результата>
- Зачем:
- причина изменения
- Что:
- ключевое изменение 1
- ключевое изменение 2
- Проверка:
- как проверено
<type>(<scope>): <short action description>
- Why:
- reason for change
- What:
- key change 1
- key change 2
- Check:
- how verified (command/test/smoke-check)
- One commit = one logical task
- Don't mix feature changes with large refactoring
- Update docs in the same commit where behavior changes
Use ! in header for breaking changes:
feat(sql)!: rename stg_orders column contract
Add footer:
BREAKING CHANGE: column order_date renamed to created_at
feat(sql): добавлен скрипт загрузки DM-слоя
- Зачем:
- нужны витрины для аналитики
- Что:
- добавлен 06_dml_dm.sql с загрузкой фактов и измерений
- добавлены индексы для оптимизации запросов
- Проверка:
- psql -f dwh-modeling/sql/06_dml_dm.sql
- SELECT COUNT(*) FROM dm.fact_orders;
fix(bookings): исправлен порт в docker-compose.yml
- Зачем:
- конфликт с локальным PostgreSQL на 5432
- Что:
- порт хоста изменен на 5433
- Проверка:
- docker compose up -d
- psql -h localhost -p 5433 -U postgres
docs(modeling): обновлена схема Data Vault после ревью
chore(docs): синхронизировано оглавление README
❌ added sql script # no type, past tense
❌ feat: добавлен скрипт # no scope
❌ fix: исправлен баг # no scope, vague and non-actionable
❌ feat(sql): added new table # past tense in English subject
❌ feat(sql): add script and fix validation and update docs # multiple concerns
❌ feat(docs): add README и почини SQL # mixed languages in one message
# Feature
feat(scope): добавлена новая возможность
# Bug fix
fix(scope): исправлена проблема
# Documentation
docs(scope): обновлена документация
# Refactoring
refactor(scope): упрощена структура без изменения поведения
# Performance
perf(scope): ускорено выполнение
# Maintenance
chore(scope): обновлены служебные настройки
# Feature (lang:en)
feat(scope): add new capability
# Bug fix (lang:en)
fix(scope): correct response parsing
# Documentation (lang:en)
docs(scope): update setup guide