Skip to content

Instantly share code, notes, and snippets.

@dl6nm
Last active May 3, 2022 12:06
Show Gist options
  • Save dl6nm/efdc0c05300dc73c17007f50ba7fdfe1 to your computer and use it in GitHub Desktop.
Save dl6nm/efdc0c05300dc73c17007f50ba7fdfe1 to your computer and use it in GitHub Desktop.
Git Commit Message Conventions - Conventional Commits

Git commit message conventions

Format of the commit message

[revert: ]<type>[(<scope>)]: <subject>
    |      |        |           |
    |      |        |           +--- very short description of the change
    |      |        |                (use imerative, parent tense: 'change' not 'changed')
    |      |        |
    |      |        +--------------- optional: specifying place of the commit change
    |      |
    |      +------------------------ feat      new feature for the user
    |                                fix       bug fix for the user
    |                                docs      changes to the documentation
    |                                style     formatting, missing semi colons, ...
    |                                refactor  refactoring production code, eg. ranaming a variable
    |                                test      adding missing tests, refactoring tests
    |                                chore     maintain; no production code change
    |              additional types:
    |                                build     build system or external dependencies
    |                                ci        ci configuration file or script changes
    |                                perf      performance improvement
    |
    +------------------------------- optional: only when reverting a commit
<BLANK LINE>
[<body>] --------------------------- optional: message body (use imerative, parent tense)
<BLANK LINE>
[<footer>] ------------------------- optional: referencing issues; breaking changes

Example commit message:

fix(middleware): ensure Range headers adhere more closely to RFC 2616

Add one new dependency, use `range-parser` (Express dependency) to compute
range. It is more well-tested in the wild.

Fixes #2310

Breaking changes

All breaking changes have to be mentioned in footer with the description of the change, justification and migration notes.

BREAKING CHANGE:

`port-runner` command line option has changed to `runner-port`, so that it is
consistent with the configuration file syntax.

To migrate your project, change all the commands, where you use `--port-runner`
to `--runner-port`.

Present tense, without a dot at the end


References:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment