Commits are the messages which tell other developers that for what the changes were made for.
Suppose you are a maintainer of a project and you are open to considering contributions from others. You would want to have good commit messages that provide you useful information about what has changed and why. Because when things really tend to go perplexing then the revision history is a great resource to find out quickly where exactly things went wrong.
Personally, I feel that great developers do emphasize writing good messages not just for themselves but for others too.
Now, you would have got why it is important to write valuable messages. But now you would be thinking that it's enough Udatta, now please share some standard messages template or so, so that I can also write nice messages.
So, here we go for what you started reading this blog in the first place. I am mentioning some standard messages that you can write so that you get an idea and curate it in your way.
- feat - a new feature
- fix - a bug fix
- docs - changes in documentation
- style - everything related to styling
- refractor - code changes that neither fixes a bug or adds feature
- test - everything related to testing
- chore - updating build tasks, package manager configs, etc.
Use this to start the message. Like if we added a
test for a function which checks leap year, we start with a
test: add unit test for leapYearCheck()
I have covered most of them which are mostly used, and you can comment down if you know some more.
Thanks For Reading!!
Connect With Me