Fork me on GitHub

Project Notes

#381 Conventional Commits

A specification for adding human and machine readable meaning to commit messages.

Notes

The Conventional Commits specification is a lightweight convention on top of commit messages. It provides an easy set of rules for creating an explicit commit history; which makes it easier to write automated tools on top of. This convention dovetails with Semantic Versioning, by describing the features, fixes, and breaking changes made in commit messages.

The commit message should be structured as follows:

<type>[optional scope]: <description>

[optional body]

[optional footer(s)]

Where for example:

  • type could be: fix, feat etc
  • optional scope could be (api), (css) etc

It aligns with semantic versioning (Semantic Versioning / SemVer) by mapping commit types to version bump semantics:

  • feat: new feature → MINOR bump
  • fix: bug fix → PATCH bump
  • BREAKING CHANGE: (or ! after type) → incompatible API change → MAJOR bump

Status?

  • the idea has been adopted or at least considered by many teams
  • It has spurred an ecosystem of tooling: linters (e.g., commitlint), commit message generators (e.g., commitizen), changelog generators, release-automation tools and more.

See also: LCK#380 Conventional Comments

Credits and References

About LCK#381 vcsmethods

This page is a web-friendly rendering of my project notes shared in the LittleCodingKata GitHub repository.

Project Source on GitHub Return to the LittleCodingKata Catalog
About LittleCodingKata

LittleCodingKata is my collection of programming exercises, research and code toys broadly spanning things that relate to programming and software development (languages, frameworks and tools).

These range from the trivial to the complex and serious. Many are inspired by existing work and I'll note credits and references where applicable. The focus is quite scattered, as I variously work on things new and important in the moment, or go back to revisit things from the past.

This is primarily a personal collection for my own edification and learning, but anyone who stumbles by is welcome to borrow, steal or reference the work here. And if you spot errors or issues I'd really appreciate some feedback - create an issue, send me an email or even send a pull-request.

Follow the Blog follow projects and notes as they are published in your favourite feed reader