This document serves as a guide for contributors to Project A when making commits to the repository. It outlines the best practices and guidelines to maintain code quality and consistency.
Basic Commit Guidelines
- Use Descriptive Commit Messages: Your commit message should describe what has been changed, why it was done, and provide any necessary context. Follow the convention:
[type](scope): subject
.
Commit Message Types
- Features: Add a new feature or change functionality.
- Bugfixes: Fix a bug or resolve an issue.
- Refactoring: Improve the code structure without changing its external behavior.
- Doc: Update documentation.
- Style: Improve code style, formatting, and other non-functional changes.
- Tests: Add or modify tests.
Example Commit Message
[Refactor](docs): Improve documentation for commit message best practices.
Commit Message Structure
- Type: Short capitalized verb that describes the type of change (e.g., Add, Fix, Update).
- Scope: Short identifier for the part of the codebase affected (e.g., ComponentName, Functionality).
- Subject: A short summary of the commit that answers the question, "What was changed?".
Additional Tips
- Limit Commit Size: Each commit should represent a single change. Avoid combining multiple changes into one commit.
- Avoid WIP Commits: If you are working on a feature, do not commit it as a WIP (Work In Progress). Instead, create a branch for your work and make commits on that branch.
- Use Pull Requests: Use pull requests for code reviews and discussions before merging your changes into the main branch.
Related Links
For more detailed information, please refer to the Code of Conduct.
Code of Conduct