OOZOU
Get in Touch
Back to Blog

Commit Messages Matter

This is why I think Commit Messages matter and how they can help you become a better developer.

May 29, 2018
4 min read
Commit Messages Matter

Git is currently the most popular version control of the software industry. Created by Linus Torvalds, the mind behind Linux kernel, himself back in 2005, It is now one of a must-have tool in your software development arsenal.

One of the things I like the most about Git is the commit system. It makes revising older changes and patching them super convenient because of the context it provides. However, it is also one of the most abused features of Git.

Take a look at this example:

It was undeniably a mess.

This is what happens to a lot of projects including ones I used work on. What people usually do are one (if not several) of the followings:

Lazy commits

Such as bug fix, new feature, GUI doneand etc. This type of commit destroys the purpose of the commit message which should provide context to the changes.

End of the Day Commits

Many people I’ve worked with use Git this way. They push everything they’ve work on during the day as one commit before heading home. This creates a huge commit with multiple changes which makes it harder to revise if it introduces a bug into the system.

Multitasking Commits

What I mean by multitasking is that the commit does multiple things e.g. fix class A for feature A and add method B to update feature B.

These types of commit remove context from themselves and make it hard and sometimes even impossible to trace what has happened. The maintainer has to go through the diff which could take up to several hours if not days.

Software development is collaborative work. fancy-quote

Even if you’re working solo. You still need to collaborate with yourself months ago. Your current self wouldn’t have the exact idea of what you were doing. Bad log wastes time when others (including future you!) need to look for some changes!

Peter Hutterer made a really good point on his blog

“Re-establishing the context of a piece of code is wasteful. We can’t avoid it completely, so our efforts should go to reducing it[as much] as possible. Commit messages can do exactly that and as a result, a commit message shows whether a developer is a good collaborator.”

There are hundreds of guidelines already on the internet that helps you write a better commit message. Here are some tips and an example template I’ve been using.

**_

  1. Use git commit without the -m flag_**

This will let you write your commit in your favourite text editor which makes it a lot easier to write longer commit message.

_ 2. Why what and how_

Think before you make a short one-lined commit message. Most of the time it’s not a good idea. The commit should address these three aspects of the patch. Why is this commit here? What it does to the system? Are there any side effect? and How it’s done

Here is a template I’ve been using taken from Tim Pope personal blog which confers you how to write a good commit message.

Capitalized, short (50 chars or less) summary
More detailed explanatory text, if necessary. Wrap it to about 72
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 (unless you omit
the body entirely); tools like rebase can get confused if you run the
two together.
Write your commit message in the imperative: “Fix bug” and not “Fixed bug”
or “Fixes bug.” This convention matches up with commit messages generated
by commands like git merge and git revert.
Further paragraphs come after blank lines.
- Bullet points are okay, too
- Typically a hyphen or asterisk is used for the bullet, followed by a

 single space, with blank lines in between, but conventions vary here
- Use a hanging indent

lang-text

As I’ve stated earlier, software development is a collaborative work. By carefully crafting your commit message, you are also increasing the productivity and quality of your software.

Related Articles

How Can I Design a Software: A Beginners Guide for Business Owners

How Can I Design a Software: A Beginners Guide for Business Owners

Designing software is an exciting yet complex process that involves creativity, logical thinking, and problem-solving skills.

Read More →
The Future of Edge Computing: What Businesses Need to Know

The Future of Edge Computing: What Businesses Need to Know

The digital landscape is evolving rapidly, and businesses must adapt to keep up with rising demands for speed, efficiency, and real-time processing.

Read More →
The Future of Retail: AI, AR, and Digital Transformation Trends

The Future of Retail: AI, AR, and Digital Transformation Trends

Retail is evolving at an unprecedented pace, driven by AI (Artificial Intelligence), AR (Augmented Reality), and digital transformation technologies, revolutionizing the retail industry. Traditional brick-and-mortar stores are no longer just about selling products—they are becoming smart, interactiv

Read More →

Have a Project in Mind?

Let's discuss how we can help bring your ideas to life with our expertise in web and mobile development.

Start a Conversationhello@oozou.com
OOZOU Logo

Bangkok · Singapore · Hong Kong

X
Facebook
Instagram
LinkedIn

Services

  • Web Development
  • AI & Generative AI Solutions
  • Mobile App Development
  • Data Analytics & Engineering
  • UI/UX Design & Product Design
  • Digital Transformation

Company

  • About Us
  • Careers
  • Blog
  • Whitepapers
  • Case Studies
  • Today I Learned
  • Contact

More

  • Industries
  • Get an Estimate
  • Partner Network
© 2026 OOZOU. All rights reserved.
Privacy PolicyCode of ConductABAC Policy