“Good Commit” vs “Your Commit”: How to Write a Perfect Git Commit Message

Rehan Pinjari
4 min readJul 19, 2024
“Good Commit” vs “Your Commit”: How to Write a Perfect Git Commit Message

Have you ever tried fixing a bug and come across a commit message that says “fixed stuff”? Maybe you’ve encountered the term “changes” and thought, “What changes?” These unclear commits might be a developer’s nightmare.

Bad commit messages frustrate future work, making debugging hard and figuring out changes like reading hieroglyphics.

Imagine combing through lines of code to see which “stuff” was fixed.

Confusing, isn’t it? Now, let’s change the part with “Good Commit” messages.

Have a BIG IDEA in mind? Let’s discuss what we can gain together.

Let’s talk → Gmail | LinkedIn

The Solution

“Good Commit” messages are now your best friend. They offer clear standards and make life simpler for everyone related. Here’s how to make them.

Focus on the “Why”

A great commit message shows the reason for the commit, and not just what was done.

Consider “implemented user login functionality” instead of “added login form.” The first one explains why the change was made, while the later just…

--

--