Naming a commit well is as important as the change itself.
Linus Torvalds says that the name of a commit is as important as the change reflected by it. Here's why I agree. ✍️
Linus Torvalds says that the name of a commit is as important as the change reflected by it. I wholeheartedly agree with him and I’ll tell you why.
Image: Linus Torvalds on the importance of making a proper pull request with a signed tag if you want him to pull from GitHub. He also talks about avoiding using the GitHub web interface due to its poor commit message standards.
As a big advocate of Version Control, and having received exposed to git fairly early in my programming journey (thanks to Open Source), I totally agree with this statement.
You should absolutely put in the time and effort to name your commit messages well because it offers valuable returns for a software project. For projects that are in active development, it's important, and even more important for projects that are in the maintenance or support phase.
There are many advantages to writing good commits:
Good commit messages help developers gather context quickly. It makes the process of searching for changes easy and effective.
It helps understand the code changes clearly. The commit is written in natural language, and the code is written in machine readable language, the fusion of both helps you understand the change.
Serves as documentation. I'm not a fan of polluting a codebase with unnecessary comments. Commit messages save the effort of writing comments everywhere. If there's something that you don't understand, you could simply see the commit history and draw conclusions from the commit names and commit descriptions.
It's a good practice for yourself. Naming and describing commit messages well forces developers to create quality commits, not one massive commit with a million changes. You tend to commit small, and commit frequently so that the commit is meaningful and easy to understand.
It makes Pull Requests (PRs) easy to review. Good commit messages and descriptions make it easy for reviewers to understand specific pieces of the logic in a cohesive way. It makes discussions easier because you can easily reference specific commits when discussion design & architecture.
If you actively work on Open Source (OSS) projects, these advantages will become clear quickly.
The next time you push code, remember these tips. They will make you a better engineer in the long-term and your team mates will thank you for your efforts.
— AdiPat ✨If you're looking for someone to build your startup MVP, contact me!
I actively work on Open Source Software, check out my GitHub Profile. ✨
Follow me on Instagram (@adityapatange), I talk about tech, meditation, startups and hip hop! ⚡️
I write byte-sized insights on Threads to supercharge your day. 💡