title: Git Commit Style
category: Git
time: 1731256960368
---

```
<TYPE>(<Scope>): <Subject>

<Body>

<Footer>
```

### Notes:
- A commit that introduce breaking changes must be indicated by an `!` before the `:` after scope. e.g. `feat(api)!: remove status endpoint`
- No dot (.) at the end, and use the imperative, present tense: "change" instead of "changed" nor "changes".
- A good suggestion is "don't capitalize the first letter", but I normally will CAP the type.

### Type:
- Update:
    - **BREAK:** Breaking change, Major version (`x.0.0`) update
    - **FEAT:** New Feature (Monor versioon `0.x.0` update)
    - **FIX:** Fix bugs (for patch number `0.0.x`)
- Other:
    - **DOCS:** Change to the documentation (README, CHANGELOG, CONTRIBUTE, API docs, etc.)
    - **STYLE / FORMAT:** Code formatting, code comment change, etc; (compiled-code neutral)
    - **REFACTOR:** Code refactoring
        - **PERF:** Performance improvement
    - **OPS:** Operational aspects like infrastructure, deployment scripts, etc.
        - **BUILD:** Changes that affect the build system or external dependencies.
        - **TEST:** Add or editing test.
        - **CI:** Changes to CI / CD configuration or scripts.
    - **MAINT:** Updating dev-related maintenance files ("non-production code" files)
    - **CHORE:** Change dependency, tools or building process. (Similar to MAINT)
    - **REVERT:** Revert to pervious version
    - **MERGE:** Merge a branch, and follows default git merge message.

### Scope (Option):
- Project division
- Packages or Modules
- e.g. `common`, `core`, `server`, `upgrade`, `changelog`, and `darwin`

### Subject: 
- This is a Summary of the change. (Should be brief)

### Body: 
- This is a details about the change.

### Footer: 
- Issue #
- Comment
- `BREAKING CHANGE:` if there is any


***Reference:***
[Git Commit Message Format Guide](https://github.com/bluejava/git-commit-guide#types)
[Other Git Guide (Deprecated)](http://ivweb.io/topic/58ba702bdb35a9135d42f83d)
[Angular.JS Commit Message Guidelines](https://github.com/angular/angular/blob/22b96b9/CONTRIBUTING.md#-commit-message-guidelines)
[Conventional Commits 1.0.0](https://www.conventionalcommits.org/en/v1.0.0/)
