Zillowe FoundationZillowe Documentation

Commits

Structured messages with types (e.g. Feat, Fix).

Commit Message Structure

[Optional Emoji] <Type>([Optional Scope]): <Subject>

# Examples:
โœจ Feat(auth): Add password strength meter
๐Ÿฉน Fix: Resolve infinite loading issue
โ™ป๏ธ Refactor(api): Simplify response handling

Components:

  • Emoji: Optional visual indicator (improves scanability)
  • Type: Required category identifier (e.g. Feat, Fix)
  • Scope: Optional context specifier in parentheses
  • Subject: Concise description in present tense (imperative mood)

Supported Types

EmojiTypeDescriptionExample
๐Ÿ› ๏ธBuildChanges to build system, tools or dependencies๐Ÿ› ๏ธ Build(webpack): Upgrade to version 5
๐Ÿš€CICI/CD pipeline changes๐Ÿš€ CI(github): Add linting workflow
๐Ÿ“šDocsDocumentation only changes๐Ÿ“š Docs: Update API reference
โœจFeatNew features or enhancementsโœจ Feat(user): Add profile customization
๐ŸฉนFixBug fixes๐Ÿฉน Fix(auth): Resolve session timeout issue
โšกPerfPerformance improvementsโšก Perf(queries): Optimize database lookups
โ™ป๏ธRefactorCode changes that neither fix bugs nor add featuresโ™ป๏ธ Refactor: Extract reusable components
๐ŸŽจStyleCode style/formatting changes๐ŸŽจ Style: Format according to style guide
๐ŸงชTestAdding or updating tests๐Ÿงช Test(api): Add integration tests
โชRevertRevert previous changesโช Revert: Return to commit abc123
๐Ÿ›ก๏ธDepsManage dependencies (e.g. adding/removing libraries)๐Ÿ›ก๏ธ Deps: Remove unused Lodash methods
๐ŸงนCleanupOrganize or remove unused code/files๐Ÿงน Cleanup: Remove unused CSS classes
๐Ÿ“ฆReleasePrepare for a release (e.g. version bump, changelog updates)๐Ÿ“ฆ Release: Prepare for v1.0.0
๐Ÿ”’SecuritySecurity-related changes๐Ÿ”’ Security(auth): Implement rate limiting
๐ŸŒI18nInternationalization/localization๐ŸŒ I18n: Add German translations
โžก๏ธMigrateMajor migrations or transitionsโžก๏ธ Migrate: Convert to TypeScript
๐Ÿ”SEOSearch engine optimization๐Ÿ” SEO: Improve meta tags
๐Ÿง AIAI/ML model or algorithm changes๐Ÿง  AI: Update recommendation algorithm
๐Ÿ“ŠDataData structure or content changes๐Ÿ“Š Data: Update seed data
๐Ÿ”งConfigConfiguration changes๐Ÿ”ง Config: Update environment variables
๐ŸŽฏUXUser experience improvements๐ŸŽฏ UX: Streamline checkout process
๐Ÿ—๏ธStructProject structure changes๐Ÿ—๏ธ Struct: Reorganize component hierarchy
๐Ÿ”AuthAuthentication/authorization๐Ÿ” Auth: Add OAuth integration
๐Ÿ“ˆTrackAnalytics or tracking๐Ÿ“ˆ Track: Add conversion events
๐Ÿ“‹APIAPI-related changes๐Ÿ“‹ API: Add pagination to endpoints
๐Ÿ”€GitGit structure and workflow changes๐Ÿ”€ Git(hooks): Update pre-commit validation

Scopes provide additional context about what part of the codebase is affected. Common scopes include:

  • Component names: header, footer, nav
  • Feature areas: auth, checkout, search
  • Technical domains: api, db, ui, ux
  • File types: css, js, tests

Best Practices

  1. Use the imperative mood for the subject (e.g. "Add feature" not "Added feature")
  2. Keep subjects concise (under 72 characters)
  3. Be specific about what changes were made
  4. No period at the end of the subject line
  5. Use consistent emoji when applicable

Extended Commit Format (Optional)

For complex changes, you can add a body after the subject:

โœจ Feat(auth): Add password strength meter

Implement zxcvbn library to provide real-time feedback on password strength.
- Displays color-coded strength indicator
- Shows improvement suggestions
- Prevents submission of weak passwords

Issue: #123

Example Workflow

Scenario: Adding a new feature and fixing related bugs

# Create a feature branch
git checkout -b feat/user-profiles

# Make changes to relevant files
git add src/components/UserProfile.js
git commit -m "โœจ Feat(profile): Add user profile editor"

# Fix a bug discovered during implementation
git add src/utils/validation.js
git commit -m "๐Ÿฉน Fix(validation): Resolve email format validation"

# Update documentation
git add README.md docs/api.md
git commit -m "๐Ÿ“š Docs(profile): Document profile endpoints"

# Push changes
git push origin feat/user-profiles

Automated Tools

Consider these tools to enforce ZFGM format:

  • commitlint: Validate commit messages against rules
  • commitizen: Interactive commit message builder
  • husky: Git hooks to validate before commit
  • gitmoji-cli: Streamline emoji usage

Advanced Tips

  • Co-authored commits: Add Co-authored-by: Name <email> at the end of the commit message body
  • Breaking changes: Mark with BREAKING CHANGE: in the commit body
  • Issue references: Include issue IDs in the commit body or footer

Last updated on

2025 ยฉ All Rights Reserved.

  • All the content is available under CC BY-SA 4.0, expect where otherwise stated.