Semantic commit messages provide a structured and standardized way of communicating the nature of changes made in a commit. By adhering to a specific format, such as the Angular convention, developers can easily understand the purpose and impact of each commit within a project's version control history. Below are examples of semantic commit messages along with their descriptions:
feat
: Adding a new feature
*Add user authentication*
Adds a new middleware to handle user authentication in the system.
fix
: Fixing bugs
*Fix typo in login form*
Corrects a small typo issue in the HTML code of the login form.
chore
: Maintenance tasks
*Update project dependencies*
Updates dependency versions to the latest stable releases.
docs
: Updating documentation
*Update API documentation*
Includes additional examples and details on using the REST API in the README.
style
: Code style improvements
*Apply consistent code formatting*
Standardizes code formatting using prettier to ensure consistency.
refactor
: Code refactoring
*Refactor authentication logic*
Reorganizes code to improve readability and maintainability.
test
: Adding or modifying tests
*Add unit test for user service*
Includes a new unit test to ensure the integrity of the user service.
build
: Changes affecting the build system or external dependencies
*Update Node.js version to 14.0.0*
Updates the Node.js version to the latest available LTS version.
ci
: Changes related to configuration and continuous integration
*Set up GitHub Actions for test execution*
Defines a workflow in GitHub Actions to automate project testing.
These examples demonstrate how semantic commit messages can provide clarity and context to the changes made in a project. While the specific keywords and formats may vary, maintaining consistency and informativeness in commit messages is essential for effective collaboration and project management.
Top comments (0)