> For the complete documentation index, see [llms.txt](https://university.obvious.in/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://university.obvious.in/product-design/mobile-engineering/git-commit-messages.md).

# Git commit messages

## 👋 Introduction

Writing clear and concise git commit messages is important to the overall health of a project and the team that is working on the project. Good commit messages have 3 critical benefits:

1. Help speed up the code review process
2. Help in writing good release notes
3. Help future maintainers (and your future self) understand why a change was made, or what exactly a particular bug was

***

## Sample commit message

```
 Short (70 chars or less) summary of changes
 More detailed explanatory text, if necessary.  Wrap it to about 80
 characters or so.  In some contexts, the first line is treated as the
 subject of an email and the rest of the text as the body.  The blank
 line separating the summary from the body is critical.
 Further paragraphs come after blank lines.
  - Bullet points are okay, too 
  - A hyphen is used for the bullet, surrounded by a single space
```

1. The summary line is written in the imperative voice, and is structured in a way so that the message completes the sentence, “If applied, this commit will…”. For eg:
   * "Split the Rx streams in RecentPatientsViewController"
   * "Add Appium checkstyle task to the git pre-push hook"
   * "Add query in PatientRepository to get count of sync-pending records"
2. Summary lines start with words like “Add”, “Update”, and “Fix” instead of Added, Updated and Fixed
3. Summary lines never end with a period, just like the subject of an email
4. The explanatory text isn’t required but encouraged, especially when a commit fixes a bug. It’s good practice to explain clearly why a certain issue was occurring and how the commit fixes it.

***


---

# 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, and the optional `goal` query parameter:

```
GET https://university.obvious.in/product-design/mobile-engineering/git-commit-messages.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
