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

- bug fix

- refactor

✔️ - Add null check to input parser

✔️ - 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:

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

Last updated