# Commit message guidelines

<figure><img src="/files/phOqyIiKbklQTpQi6Q8A" alt="" width="200"><figcaption><p>exile.watch</p></figcaption></figure>

{% hint style="danger" %}
Your contributions will be rejected if you won't follow this guideline.
{% endhint %}

## About

{% hint style="info" %}
We have very precise rules over how our git commit messages can be formatted.&#x20;

We use the git commit messages to **generate @exile-watch/{project} change logs via** [**@exile-watch/conventional-changelog-config**](https://github.com/exile-watch/splinters/pkgs/npm/conventional-changelog-config).

This also leads to **more readable messages** that are easy to follow when looking through the **project history**.&#x20;
{% endhint %}

```
<type>[optional scope]: <description>
```

The commit contains the following structural elements, to communicate intent to the consumers of our libraries:

1. **fix:** a commit of the *type* `fix` patches a bug in your codebase (this correlates with [`PATCH`](http://semver.org/#summary) in Semantic Versioning).
2. **feat:** a commit of the *type* `feat` introduces a new feature to the codebase (this correlates with [`MINOR`](http://semver.org/#summary) in Semantic Versioning).
3. **BREAKING CHANGE:** a commit that appends a `!` after the type/scope, introduces a breaking API change (correlating with [`MAJOR`](http://semver.org/#summary) in Semantic Versioning). A BREAKING CHANGE can be part of commits of any *type*.
4. other *types* that are supported:
   * `build:`&#x20;
   * `chore:`&#x20;
   * `ci:`
   * `docs:`&#x20;
   * `style:`
   * `refactor:`&#x20;
   * `perf:`&#x20;
   * `test:`

## Examples

tl;dr: [https://www.conventionalcommits.org/examples](https://www.conventionalcommits.org/en/v1.0.0/#examples)

### Commit message with scope <a href="#commit-message-with-scope" id="commit-message-with-scope"></a>

```
feat(lang): add Polish language
```

### Commit message with no scope <a href="#commit-message-with--to-draw-attention-to-breaking-change" id="commit-message-with--to-draw-attention-to-breaking-change"></a>

```
docs: update README.md
```

### Commit message with `!` to draw attention to breaking change <a href="#commit-message-with--to-draw-attention-to-breaking-change" id="commit-message-with--to-draw-attention-to-breaking-change"></a>

```
feat!: send an email to the customer when a product is shipped
```

## References

* [Conventional Commits specification](https://www.conventionalcommits.org/en/about/)
* [Angular convention](https://github.com/angular/angular/blob/22b96b9/CONTRIBUTING.md)
* [@commitlint/config-conventional](https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.exile.watch/development/commit-message-guidelines.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
