0% found this document useful (0 votes)
144 views1 page

Conventional Commits

This document provides guidelines for writing conventional commits with standardized message structures. Commit messages should consist of a type, optional scope, description, optional body and optional footer. The type must be one of feat, fix, docs, style, refactor, perf, test, build, ci, chore, or revert. The description provides a short summary. The body allows for additional details and the footer can contain issue references. Breaking changes must be indicated at the start of the body or footer with BREAKING CHANGE:.

Uploaded by

Eklavya Gupta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
144 views1 page

Conventional Commits

This document provides guidelines for writing conventional commits with standardized message structures. Commit messages should consist of a type, optional scope, description, optional body and optional footer. The type must be one of feat, fix, docs, style, refactor, perf, test, build, ci, chore, or revert. The description provides a short summary. The body allows for additional details and the footer can contain issue references. Breaking changes must be indicated at the start of the body or footer with BREAKING CHANGE:.

Uploaded by

Eklavya Gupta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Conventional Commits v1 Cheat Sheet

by marco.lizza via cheatography.com/191583/cs/39815/

Commit message structure

<type>[scope]: <description>
[body]
[footer]

A commit that has the text BREAKING CHANGE: at the beginning of its optional body or footer section introduces a breaking API change.

Types

feat A new feature

fix A bug fix

docs Docume​ntation only changes

style Changes that do not affect the meaning of the code (white​-space, format​ting, missing semi-c​olons, etc)

refactor A code change that neither fixes a bug nor adds a feature

perf A code change that improves perfor​mance

test Adding missing tests or correcting existing tests

build Changes that affect the build system or external depend​encies (e.g. Gradle, Maven)

ci Changes to our CI config​uration files and scripts (e.g. GitLab, Jenkins)

chore Other changes that don't modify src or test files

revert Reverts a previous commit

Specif​ication

1. Commits MUST be prefixed with a type, which consists of a verb, feat, fix, etc., followed by a colon and a space.

2. The type feat MUST be used when a commit adds a new feature to your applic​ation or library.

3. The type fix MUST be used when a commit represents a bug fix for your applic​ation.

4. An optional scope MAY be provided after a type. A scope is a phrase describing a section of the codebase enclosed in parent​hesis (e.g. fix(
pa​rser):).

5. A descri​ption MUST immedi​ately follow the type/scope prefix. The descri​ption is a short descri​ption of the pull request (e.g., fix: array pa
rsing issue when multiple spaces were contained in string).

6. A longer commit body MAY be provided after the short descri​ption. The body MUST begin one blank line after the descri​ption.
7. A footer MAY be provided one blank line after the body. The footer SHOULD contain additional meta-i​nfo​rmation about the pull-r​equest (such
as the issues it fixes, e.g., fixes #13, #5).

8. Breaking changes MUST be indicated at the very beginning of the footer or body section of a commit. A breaking change MUST consist of the
uppercase text BREAKING CHANGE, followed by a colon and a space.

9. A descri​ption MUST be provided after the BREAKING CHANGE: , describing what has changed about the API (e.g. BREAKING CHANGE: en
viro​nment variables now take precedence over config files).

10. Types other than feat and fix MAY be used in your commit messages.

By marco.lizza Published 8th August, 2023. Sponsored by ApolloPad.com


cheatography.com/marco- Last updated 8th August, 2023. Everyone has a novel in them. Finish
lizza/ Page 1 of 1. Yours!
https://apollopad.com

You might also like