Conventional Commits is a specification for adding human and machine readable meaning to commit messages
Here are the types of Conventional Commits:
feat
— adds a new feature.
feat: Add login page
fix
— fixes a bug.
fix(api): Return 404 for invalid endpoints
docs
— add/update a documentation, no code is touched
docs(readme): Update installation instructions
chore
— update deps
chore: Update dependencies
Using Conventional Commits can help make your commit messages clearer and easier to understand. By using a consistent format, you can convey important information about the changes you made and help others understand the progress of your project.
i was tired of lame 1 line commits and wasting time switching context and recalling the changes I have made, so I open-sourced a library OpenCommit that makes conventional commits for you in just 2 keys oc
typed in a terminal.
i know it's impressive, i'll probably impress the world more with other extraordinary inventions, you may follow my bird twitter
Top comments (5)
wow! i've got respected at my job just using OpenCommit! Thanks
THATS GREAT BRO <3
I tend to dislike adding additional clutter to commit summary lines as it already tends to be difficult to fit a good description within the character limit.
A better way to make commits somewhat machine-readable, imo, would be to add tags at the bottom of the commit, something like
Then you can just do
git log --grep #bugfix
if you want to list all bugfix commits, etc.grep is great, but it is a new convention, and a good one, you will have #feature #bugfix/bug
conventional commits are like "already done convention"
So true. Thanks for sharing!
I am also a big fan of conventional commit and also conventional branch naming!
I implemented this vscode extension for that.