All commits created for this repository must use gitmoji-prefixed Conventional Commit messages.
Format:
<gitmoji> <type>(<scope>): <description>
The scope is optional. Keep the description imperative, concise, and no longer than 72 characters when practical.
Examples:
✨ feat(api): add user authentication endpoints🐛 fix(webapp): resolve login redirect loop♻️ refactor(db): normalize user schema relations📝 docs: update API documentation⬆️ chore(deps): upgrade TanStack Query to v5.62🗃️ feat(db): add posts table with privacy levels✅ test(api): add auth middleware tests
When committing uncommitted work, analyze both staged and unstaged changes before creating commits:
git status --porcelain
git diff --stat
git diff --cached --statGroup changes into atomic commits in this priority order:
- By feature or task.
- By package or app.
- By change type.
- By file type or configuration purpose.
Use these grouping heuristics:
- Schema changes plus migrations belong in one database commit.
- API route changes and their tests belong in one commit.
- Multiple files in the same feature directory usually belong in one commit.
- Configuration files should be grouped by purpose.
- Documentation updates should usually be separate.
- Dependency changes should be separate, and lockfile changes must be committed with the corresponding manifest changes.
| Emoji | Type | Use When |
|---|---|---|
| ✨ | feat | New features, packages, API endpoints, or components |
| 🐛 | fix | Bug fixes |
| 🚑️ | fix | Critical production hotfixes |
| ♻️ | refactor | Code restructuring without behavior changes |
| 📝 | docs | README, comments, API docs, or other documentation |
| 🎨 | style | Code formatting or lint fixes |
| ⚡️ | perf | Performance optimizations |
| ✅ | test | Adding or updating tests |
| 🔧 | chore | Configuration changes |
| 🔨 | chore | Development scripts, build scripts, or tooling |
| ⬆️ | chore | Dependency upgrades |
| ⬇️ | chore | Dependency downgrades |
| ➕ | chore | Adding dependencies |
| ➖ | chore | Removing dependencies |
| 🗃️ | feat/fix | Database schema, migrations, seeds, or data fixes |
| 💄 | style | UI styling, CSS, or design token changes |
| 🏗️ | refactor | Major architectural changes |
| 🔥 | chore | Removing code or files |
| 🚚 | refactor | Moving or renaming files |
| 🏷️ | feat | Adding or updating TypeScript types |
| 🔒️ | fix | Security fixes |
| 👷 | chore | CI pipeline changes |
| 💚 | fix | Fixing CI/CD failures |
| 🚨 | style | Fixing linter or compiler warnings |
| 🩹 | fix | Minor non-critical fixes |
| 🧱 | chore | Infrastructure changes |
| 🌐 | feat | Internationalization or localization |
| 💡 | docs | Source code comments |
| 🙈 | chore | .gitignore updates |
| 🔖 | chore | Releases, versions, or tags |
Choose the most specific emoji for the change. Avoid ✨ unless the commit
really introduces a feature or package. Prefer 🗃️ for database changes and
🏷️ for type-only changes. For mixed commits, choose the emoji that matches the
primary purpose.
- Never commit
.envfiles, secrets,node_modules/, or generated build artifacts unless the user explicitly asks for a tracked artifact. - Check staged content before committing so sensitive files are not included.
- Run
git statusafter each commit to verify the remaining work. - If pushing, check the current branch first and warn before pushing directly to
mainormaster. - Do not force push unless the user explicitly requests it.
When the user asks to commit and push all current work:
- Inspect the full working tree, including staged and unstaged changes.
- Split changes into the logical atomic commits described above.
- Stage only the files for the current logical group.
- Commit with the required gitmoji Conventional Commit message.
- Verify
git statusafter every commit. - Push after all commits are created.
If the current branch has no upstream, use:
git push -u origin <branch-name>If the push fails because the remote has diverged or conflicts are required, stop and report the issue instead of forcing a push.