Git Intern Week 9: Importance of Commit Message.

One of the most important pieces of information every ALX Software Engineering programme
student must learn is the importance of commit messages. We were instructed to write good commit messages when submitting our assignments on GitHub. Some of our assignments and projects were graded based on the quality of our commit messages. At the time, I never truly understood their significance. However, I started appreciating their importance when I began my Open Source journey.
While working on several Open Source projects, I often found myself not only reading different commit messages but also studying them to understand why changes were made and what those changes entailed. This usually happens when I need to grasp a part of the codebase, modify it, or implement a feature that has been previously added. Commit messages written years ago have helped me complete tasks and improve projects.
During my Git internship, I have read and written many commit messages. In many cases, this process takes as much or even more time than writing the actual code. The Git and Linux Kernel communities place great importance on writing clear and meaningful commit messages. My mentor, Christian Couder, always ensures that I write high-quality commit messages. Writing good commit messages also makes it easier for reviewers to understand the changes without having to go through the code itself. Sometimes, I even gain a deeper understanding of my own code while drafting commit messages for new features.
Here are some best practices for writing commit messages that I learned from Git:
Focus on the Why & What – Explain the problem and solution, not just the code changes.
Provide Context – Include details that might not be immediately obvious to a reviewer.
Highlight Benefits – Clarify non-obvious improvements.
Document Failed Attempts – Briefly note past approaches if useful.
Formatting Guidelines:
- Start with a concise summary.
- Sign off if required.
- Wrap lines at 76 characters.
While these are not strict rules, different communities may have specific expectations for commit messages.
Update on my Outreachy Internship at Git.
I will be adding the operating system name to the existing agent capability rather than introducing a new one. There is also an ongoing discussion about whether to add a configuration option to disable the agent capability altogether.
I have sent my first patch for removing the global variable the_repository
, which I mentioned in my last update. You can check the patch here.
Next Line of Action
For my next steps, I plan to send the fifth version of my patch for adding the operating system name to the Git v2 protocol to my mentor for review before submitting it to the Git public mailing list. I have also been working on several files where I removed the the_repository
global variable, and I will be creating a patch to send to my mentor for review before sharing it with the Git public mailing list.
Thank you and see you next time.
Subscribe to my newsletter
Read articles from Usman Akinyemi directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Usman Akinyemi
Usman Akinyemi
Blogging about my Outreachy Internship @Git. My Git fork - https://gitlab.com/Unique-Usman/git for mentor review before sending patches to Git public email. Github LInk https://github.com/Unique-Usman/git