Git Semantic Commit

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

git semantic commit

Here are some examples of Git semantic commit messages following the conventional commit message
format:

Feature:

feat: add user registration functionality (#123)

- This commit introduces a new feature for users to register on the platform.
- Closes issue #123.

Fix:

fix: resolve login form validation error (#456)

- This commit fixes a bug where the login form validation was not working correctly.
- Addresses issue #456.

Docs:

docs: update API documentation for the /users endpoint

- This commit updates the API documentation for the `/users` endpoint with new information.

Style:

style: fix inconsistent indentation in main component

- This commit fixes inconsistent indentation in the `main` component for better code readability.

Refactor:

refactor: rename `getUserData` function to `fetchUserData`

- This commit refactors the `getUserData` function name to `fetchUserData` for improved clarity.

Test:

test: add unit tests for the `calculateTotal` function

- This commit adds unit tests for the `calculateTotal` function to ensure its correctness.

Chore:
chore: update dependencies to their latest versions

- This commit updates all project dependencies to their latest versions.

Additional Notes:

The first line starts with the type of change, followed by a colon ( : ). Here are the common
types:
feat : New feature
fix : Bug fix
docs : Documentation change
style : Code style changes (formatting, indentation)
refactor : Code refactoring (improvements without adding new features or fixing bugs)
test : Adding or refactoring tests
chore : Maintenance tasks that don't directly impact the code (updating dependencies, setting
up tools)
The message should be written in the present tense.
You can optionally include a brief description of the change and a reference to a related issue
number (e.g., using (#issueNumber) ).
Keep the commit message concise and informative.
Aim for consistency in your commit messages across the project.

You might also like