Follow Git commit comments convention
08 Dec 2018 - Sanjeev
Many of us may not be aware that, there are convention being followed for comments while commiting our changes to source code repositories. This is one thing I got to learn while commiting to an open source project.
Open source projects follow conventions that are well accepted by the industry. Most of the open source projects specify a convention to follow while you are commiting your changes to the repository. Here is a commit convention documentation for AngularJs. This document has become a standard for many libraries built for Angular. Example ng-lightning, ng-bootstrap.
These conventins evolved from the Git’s recommendation and command support. Here is what Git has to say w.r.t commit comment when you checkin.
Though not required, it’s a good idea to begin the commit message with a single short (less than 50 character) line summarizing the change, followed by a blank line and then a more thorough description. The text up to the first blank line in a commit message is treated as the commit title, and that title is used throughout Git. For example, git-format-patch(1) turns a commit into email, and it uses the title on the Subject line and the rest of the commit in the body
These comments can be effectivly used if one takes a good look at Git commands like git log, git shortlog
There are many blog posts which discusses in details on this topic. So not gone in detals to explain those in here..
Do let me know if you have any clarification/suggestion on this post. I will be happy to know your feedback!