> For the complete documentation index, see [llms.txt](https://b-it-bots.gitbook.io/wiki/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://b-it-bots.gitbook.io/wiki/home/_conventions/git/making-good-commits.md).

# Making good commits

## How to write good commits

You should only commit changes that are contextually related, that is your changes should be grouped in a logical way. Before pushing, you can squash your commits (see [here](https://www.devroom.io/2011/07/05/git-squash-your-latests-commits-into-one/) for an example).

### Commit messages

Your commit messages should be descriptive, as they will appear on the `CHANGELOG.rst` file. It should look something like this (based on [this](https://www.slideshare.net/TarinGamberini/commit-messages-goodpractices)):

> The first 50 characters are used for the commit summary\
> (A blank line, no text here)\
> The next section can take up to 72 characters\
> It probably makes sense to split them into smaller sentences\
> This section contains a more detailed description of your commit\
> \&#xNAN;*Why* something was added or removed and what was changed or fixed\
> Which files or packages were involved (if there are too many, your commit is too large)\
> (Another blank line)\
> Bugs fixed: #1234 Implements: name\_of\_package

#### Examples of good commits

Sometimes one line is enough, as long as it provides enough information:

```
Remove deprecated functions from mcr_object_recognition
```

Some other times, a little more context is needed:

```
Replace topological map nodes with polygons

Old version was using a standard string as a node
Nodes are now polygons which represent the rooms in the arena
This simplifies the way we check if a pose is inside a room
and the way we associate data.
Changes:
* topological_map_ros

Fixes #3
```

{% hint style="info" %}
You can read more about how to write commit messages [here](https://medium.com/@preslavrachev/what-s-with-the-50-72-rule-8a906f61f09c) and [here](http://who-t.blogspot.de/2009/12/on-commit-messages.html).
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://b-it-bots.gitbook.io/wiki/home/_conventions/git/making-good-commits.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.
