Git Commit Command Reference
Quick reference for EBRAINS conventional commits.
Commit Message Format
Commit Types
| Type | Description | Example |
|---|---|---|
| feat | New feature | feat(forms): add validation |
| fix | Bug fix | fix(api): correct endpoint |
| docs | Documentation only changes | docs(readme): update setup |
| style | Code style changes (formatting, white-space) | style: format code |
| refactor | Code restructuring (neither fixes bug nor adds feature) | refactor(db): optimize queries |
| perf | Performance improvements | perf(api): cache responses |
| test | Adding or correcting tests | test(unit): add user tests |
| chore | Build process, tooling, dependencies | chore: update dependencies |
Scopes
Common scopes used in EBRAINS projects:
- forms - Forms application
- api - API/backend services
- ui - User interface components
- handbook - Handbook documentation
- db - Database changes
- config - Configuration files
- ci/cd - Continuous integration/deployment
- infra - Infrastructure changes
- app-1, app-2 - Specific applications
- shared-utils - Shared utilities/libraries
Trailers (Footers)
Required for EBRAINS projects:
Examples
Simple Commit
Commit with Body
Full Commit with Trailer
Breaking Change
Good vs Bad Examples
Branch Commit Message File
For complex commits, use a commit message file:
Create commit-message.txt:
Commit using the file:
Amending Commits
If you need to fix your last commit message:
Related Documentation
- How to Git Commit - Step-by-step guide
- First Contribution Tutorial - Complete workflow
- Conventional Commits Specification - Official spec
- How to Keep a Changelog - Changelog guidelines