Conventional commits
Conventional Commits is a kind of the standard that specifies the format of the commit messages. It allows for better communication between developers. Also it allows automatic version number generation and automated change-log generation.
The Conventional Commits format in DESY firmware development is as follows:
<type>(<optional scope>): <subject>
#empty line
<optional body>
#empty line
<optional footer(s)>
Fields
Type
The type
specifies the type of changes in the commit.
-
Is Mandatory part of the format.
feat:
|
a commit that adds a new feature |
fix:
|
a commit fixes defects or bugs |
build
|
changes that affect build process, e.g. changing Makefile, Tcl scripts, build tool, project version, |
chore:
|
miscellaneous commits, changes that don’t alter the source, but necessary, e.g. modifying .gitignore |
ci:
|
ci pipeline changes (e.g. Jenkinsfile changes) |
docs:
|
adds or changes documentation only |
perf:
|
improvements, performance enhancements, e.g. timing or latency improvements |
refactor:
|
refactors; altering and changing the code, but not changing functionality |
revert:
|
reverting changes |
style:
|
changes do not affect the meaning (code style, white-space, formatting, indention, etc) |
test:
|
everything relates with simulation/verification, test benches, test cases |
Subject
The subject
contains a succinct description of the change.
-
Is a mandatory part of the format
-
Use the imperative, present tense: "change" not "changed" nor "changes"
-
Don’t capitalize the first letter
-
No dot (.) at the end
Body
The body
should include the motivation for the change and contrast this with previous behavior.
-
Is an optional part of the format
-
Use the imperative, present tense: "change" not "changed" nor "changes"
Footer
(optional)
The footer
gives the information about breaking changes and
is also the place to reference tickets/issues in the tracker system (Redmine) that this commits refers to.
-
Is an
optional
part of the format
e.g.
Closes: #1234
Refs: #3322
Issue: #5554
BREAKING CHANGE: detailed description