Skip to content
Semantic Git commits
JavaScript
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin perf: ⚡️ build cz prompter into one file for performace Jun 5, 2018
build docs: ✏️ add config to README Jun 6, 2018
docs docs: ✏️ add example Jun 6, 2018
lib fix: 🐛 don't add emoji to head only when "disableEmoji" is true Jul 1, 2019
test test: 💍 check prompter method is exported for Commitizen Jun 5, 2018
.eslintrc.json chore: add travis building process Oct 27, 2016
.git-cz.json fix: 🐛 don't add emoji to head only when "disableEmoji" is true Jul 1, 2019
.gitignore feat: 🎸 build binaries Apr 26, 2019
.npmignore docs: ✏️ add example Jun 6, 2018
.nvmrc feat: add support for lerna mono-repos Jun 20, 2017
.travis.yml fix: build binaries on Travis Apr 26, 2019
CHANGELOG.md chore(release): 3.2.1 [skip ci] Jul 1, 2019
README.md
index.js perf: ⚡️ build cz prompter into one file for performace Jun 5, 2018
package.json chore(deps): update dependency inquirer to v6.5.2 Aug 23, 2019
renovate.json chore: configure renovate Apr 20, 2019
run.js refactor: move /src -> /lib and create run.js Jun 4, 2018
yarn.lock chore(deps): update dependency inquirer to v6.5.2 Aug 23, 2019

README.md

Commitizen friendly

git-cz

image

Without installation

npx git-cz

Install globally standalone

npm install -g git-cz
git-cz

Install locally with Commitizen

npm install -g commitizen
npm install --save-dev git-cz

package.json:

{
  "config": {
    "commitizen": {
      "path": "git-cz"
    }
  },
}

run:

git cz

Install globally with Commitizen

npm install -g commitizen git-cz
commitizen init git-cz --save-dev --save-exact

run:

git cz

Custom config

You can provide custom configuration in changelog.config.js file in your repo. Below is default config:

module.exports = {
  "disableEmoji": false,
  "list": [
    "test",
    "feat",
    "fix",
    "chore",
    "docs",
    "refactor",
    "style",
    "ci",
    "perf"
  ],
  "maxMessageLength": 64,
  "minMessageLength": 3,
  "questions": [
    "type",
    "scope",
    "subject",
    "body",
    "breaking",
    "issues",
    "lerna"
  ],
  "scopes": [],
  "types": {
    "chore": {
      "description": "Build process or auxiliary tool changes",
      "emoji": "🤖",
      "value": "chore"
    },
    "ci": {
      "description": "CI related changes",
      "emoji": "🎡",
      "value": "ci"
    },
    "docs": {
      "description": "Documentation only changes",
      "emoji": "✏️",
      "value": "docs"
    },
    "feat": {
      "description": "A new feature",
      "emoji": "🎸",
      "value": "feat"
    },
    "fix": {
      "description": "A bug fix",
      "emoji": "🐛",
      "value": "fix"
    },
    "perf": {
      "description": "A code change that improves performance",
      "emoji": "⚡️",
      "value": "perf"
    },
    "refactor": {
      "description": "A code change that neither fixes a bug or adds a feature",
      "emoji": "💡",
      "value": "refactor"
    },
    "release": {
      "description": "Create a release commit",
      "emoji": "🏹",
      "value": "release"
    },
    "style": {
      "description": "Markup, white-space, formatting, missing semi-colons...",
      "emoji": "💄",
      "value": "style"
    },
    "test": {
      "description": "Adding missing tests",
      "emoji": "💍",
      "value": "test"
    }
  }
};

Commit Message Format

  • A commit message consists of a header, body and footer.
  • The header has a type and a subject:
<type>[(<scope>)]: <emoji> <subject>
[BLANK LINE]
[body]
[BLANK LINE]
[breaking changes]
[BLANK LINE]
[footer]

The header is the only mandatory part of the commit message.

The first line (type + subject) is limited to 50 characters [enforced]

Any other line should be limited to 72 character [automatic wrapping]

This allows the message to be easier to read on GitHub as well as in various git tools.

Type

Must be one of the following:

  • test — Adding missing tests
  • feat — A new feature
  • fix — A bug fix
  • chore — Build process or auxiliary tool changes
  • docs — Documentation only changes
  • refactor — A code change that neither fixes a bug or adds a feature
  • style — Markup, white-space, formatting, missing semi-colons...
  • ci — CI related changes
  • perf — A code change that improves performance

Subject

The subject contains succinct description of the change:

  • Use the imperative, present tense: "change" not "changed" nor "changes"
  • No dot (.) at the end.

Body

Just as in the subject, use the imperative, present tense: "change" not "changed" nor "changes". The body should include the motivation for the change and contrast this with previous behavior.

Affects [only on lerna environments]

Select the packages the commit affected.

Breaking Changes

Breaking Changes must start with the words BREAKING CHANGE: .

Footer

The footer is the place to reference any tasks related to this commit.

Why this Fork?

npm i -g git-cz
added 1 package in 0.612s

Installs in 0.6s vs 31.1s.

npm i -g mol-conventional-changelog
added 345 packages in 31.076s
You can’t perform that action at this time.