So why you need commit guidelines at all? If you browse the log of any random Git repository, you will probably find its commit messages are more or less a mess.
So I started follwoing a pattern that try to clear the mess a little less messy. My commit message has the following pattern:
--[verb]:[changes performed]
Verb can be any of the following:
init
update
fix
refactor
log
removed
- First commit after setting up a repo:
--init: initial setup
- After adding new changes:
--update: added db connections
- After making any fix:
--fix: DB pool connection instetad of normal connection
- After removing anything:
--removed: redis was no longer required for todo app
- When you moved a repeting code-block as util function:
--refactor: new util to validate array payload for todos
- After adding logs for debug:
--log: added debudding logs inside update todo controller
- Almost all my recent repo follow this commit convention. Checkout my repos
- Recently Gaurav adopted this convention. Checkout his payroll system demo app