Few Tips for writing better commit messages
Lakh Bawa
Posted on August 11, 2020
I was reading the source code of Vuejs 3 just a few minutes back and found a commit message template used by Evan You. It looked interesting to me. check and try to apply it in your workflow, if you like it.
Prefixes to add before commit messages:
test: (working on tests)
refactor: (refactoring the code)
fix: (doing some bug fixes
feature: (adding the new feature)
build: ( adding some package or something required when building)
types: (adding the variable type, interface or something like that)
style: (some CSS or style improvement that does not affect the core functionality)
docs: (wrote some documentation or code comments)
wip: (full form: work in progress, when something is under work in progress usually some complex stuff that has to be done in parts)
example commit message:
fix: fixed title not defined on the jobs page
Improved
One more idea I learned from Angular Contribution Guide. we can improve our commit messages further to include the area of changes.
After Commit prefix like fix
or refactor
you can include the module or feature in brackets. just like following.
fix(auth): fixed the refresh token issue
refactor(registration): Improve the performance by putting email sending logic in queue
Thanks for reading.
💖 💪 🙅 🚩
Lakh Bawa
Posted on August 11, 2020
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
opensource What metrics would you like to see instantly when you're exploring a repo on GitHub?
June 10, 2020