DEV Community

Cover image for Your Git Commit Messages Suck! Here's What To Fix 🛠
Arjun Vijay Prakash
Arjun Vijay Prakash

Posted on

Your Git Commit Messages Suck! Here's What To Fix 🛠

Writing commit messages is like a daily exercise you have to practice as a programmer.

Even if you are writing code for fun, it's important to realise this small detail reflects your developer personality in general.

Writing quality commits is what separates the average developer from the extraordinary one.


Do this! 👇

Write better Git commit messages with these things in mind:

  • Start with a verb and use the present tense.
  1. ❌ Improved, Fixed, Updated
  2. ✅ Improve, Fix, Update
  • Describe why the commit is necessary.

  • Describe what the commit does. Refer to tickets/issues if applicable.

Example:

Image


Final Thoughts 🙌

Comment down some tips on writing Git commits you use as a Software Developer!

Also, insights on this short-form content would be appreciated.

I hope you liked the article! ❤️

Connect with me on linktree.

Happy Coding! 🚀
Thanks for 23102! 🤗

Top comments (10)

Collapse
 
eayurt profile image
Ender Ahmet Yurt

Thank you for the post. Writing good git commits is really important. There is a git repo regarding it github.com/joelparkerhenderson/git... and also you can create a commit template and share it with the community 🥳

Collapse
 
arjuncodess profile image
Arjun Vijay Prakash

Oh, I didn't knew that.

Thanks!

Knowledge in return of knowledge, haha.

Collapse
 
perttisoomann profile image
Pert Soomann

Good advice, I like the "reason" part, people usually leave that out and that's the important bit - we can see what the code changes are, and figure out what the commit is supposed to do, but why is much harder to work out, especially when browsing through older code base when original developers are not available to answer the questions anymore.

Collapse
 
arjuncodess profile image
Arjun Vijay Prakash

Exactly! Thanks for reading.

Collapse
 
otumianempire profile image
Michael Otu

Implement form validation to prevent unnecessary API calls that results in error because of validation

Something like this?

Collapse
 
arjuncodess profile image
Arjun Vijay Prakash

"Implement form validation to prevent unnecessary API calls" should do fine. Thanks for the comment!

Collapse
 
get_pieces profile image
Pieces 🌟

Thanks for sharing.

Collapse
 
arjuncodess profile image
Arjun Vijay Prakash

Appreciate those kind words!

Collapse
 
leeexing profile image
LEE

This help me。THS

Collapse
 
arjuncodess profile image
Arjun Vijay Prakash

Thanks for reading.