DEV Community

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

Posted on

14 4 3 5 3

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! πŸ€—

Image of Datadog

How to Diagram Your Cloud Architecture

Cloud architecture diagrams provide critical visibility into the resources in your environment and how they’re connected. In our latest eBook, AWS Solution Architects Jason Mimick and James Wenzel walk through best practices on how to build effective and professional diagrams.

Download the Free eBook

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.

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up