# Commit Message Conventions

### Guidelines

Writing good commit messages helps you and your teammates to track changes more effectively. The commit message should provide a good summary of the changes made.

Be specific

:x: - `bug fix`

:x: - `refactor`

:heavy\_check\_mark: - `Add null check to input parser`

:heavy\_check\_mark: - `Refactor navbar component for better readability`

#### Be concise

If you find it difficult to summarise your changes, consider splitting them into multiple commits. Try to group related changes together in commits for easier compartmentalisation.

### Conventions

While you may enter anything in the commit message, we strongly recommend sticking to some convention when creating your commit messages.

A common convention is:

First line: 80-character title, phrased imperatively

Then if your change is complex, elaborate on the change in prose.

```
Change greeting from "Hi" to "Hello"

"Hi" is a bit too informal for a greeting. We should change it to "Hello" instead,
so that our users don't feel like we are being too informal. Blah blah blah blah.
Blah blah.
```

Another convention is [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/):

```
feat: add button
fix: prevent text overflow
```

One bonus of this convention is that branches can be named similarly, e.g. (`feat/add-button)`.

You may also refer to CS2103/T (Software Engineering)'s conventions for naming: <https://se-education.org/guides/conventions/git.html>


---

# 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://wiki.nushackers.org/orbital/git/advanced-concepts/commit-message-conventions.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.
