0% found this document useful (0 votes)
2 views

commit_culture

The document outlines the key components of Conventional Commits, including type, scope, and subject, which help categorize changes in a codebase. It highlights the benefits of using this specification, such as consistency, automation, and improved collaboration among team members. Additionally, it provides guidance on implementing Conventional Commits through team education, commit linters, and automated changelogs.

Uploaded by

Beka Chaduneli
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

commit_culture

The document outlines the key components of Conventional Commits, including type, scope, and subject, which help categorize changes in a codebase. It highlights the benefits of using this specification, such as consistency, automation, and improved collaboration among team members. Additionally, it provides guidance on implementing Conventional Commits through team education, commit linters, and automated changelogs.

Uploaded by

Beka Chaduneli
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

Key Components of Conventional Commits:

Type: Specifies the category of the change, such as feat (new feature), fix (bug
fix), docs (documentation), style (code style changes), refactor (code
restructuring without changing functionality), test (adding or modifying tests),
and chore (miscellaneous tasks).

Scope: Optional component that indicates the part of the codebase affected by the
change, like a specific module or function.

Subject: A concise description of the change, written in the imperative mood (e.g.,
"add user authentication").

Benefits of Conventional Commits:

Consistency: Maintains a uniform commit history, making it easier to understand the


evolution of the codebase.

Automation: Facilitates automated processes like changelog generation and semantic


versioning.

Collaboration: Enhances team communication by clearly conveying the purpose of each


change.

Implementing Conventional Commits:

Educate Your Team: Ensure all contributors understand the Conventional Commits
specification and its importance.

Use Commit Linters: Integrate tools that enforce commit message formats, such as
commitlint, into your development workflow.

Automate Changelogs: Utilize tools like standard-version to generate changelogs


based on commit messages automatically.

By adopting the Conventional Commits specification, you can enhance the clarity and
maintainability of your project's history, leading to more efficient development
and collaboration.

Sources

Adopting a standardized commit message schema enhances collaboration and


maintainability in software projects. The Conventional Commits specification
provides a structured approach to writing commit messages. Here's a comprehensive
overview of the commit types defined by this convention:

1. feat: Introduces a new feature to the codebase.

Example: feat: add user authentication module


2. fix: Addresses a bug fix.

Example: fix: resolve login error on password reset


3. docs: Pertains to documentation-only changes.

Example: docs: update API usage examples in README


4. style: Involves changes that do not affect the meaning of the code (e.g.,
formatting, missing semicolons).

Example: style: reformat codebase according to ESLint rules


5. refactor: Involves code changes that neither fix a bug nor add a feature, such
as code restructuring.

Example: refactor: optimize data processing logic


6. perf: Improves performance without altering functionality.

Example: perf: enhance query efficiency for large datasets


7. test: Adds or corrects existing tests.

Example: test: add unit tests for authentication service


8. build: Affects the build system or external dependencies (e.g., gulp, npm).

Example: build: update webpack configuration for production


9. ci: Relates to continuous integration configuration and scripts (e.g., Travis,
CircleCI).

Example: ci: add GitHub Actions workflow for automated testing


10. chore: Concerns routine tasks that don't modify source or test files.

Example: chore: update project dependencies


11. revert: Reverts a previous commit.

Example: revert: undo changes from commit abc1234


12. BREAKING CHANGE: Indicates a significant change that alters the API and may
require users to update their code.

Example: feat!: overhaul authentication mechanism


Description: BREAKING CHANGE: The authentication service now uses OAuth 2.0
exclusively.
By consistently applying these commit types, teams can maintain a clear and
informative project history, facilitating better collaboration and more efficient
project management.

You might also like