Skip to content
On this page

markBreakingChangeMode

Add the ! mark in the header, Highlight that the commit message belongs to BREAKINGCHANGE.

See: The rule by Conventional Commits
E.g:

text
# Commit message with ! to draw attention to breaking change
feat!: send an email to the customer when a product is shipped

# Commit message with scope and ! to draw attention to breaking change
feat(api)!: send an email to the customer when a product is shipped

# Commit message with both ! and BREAKING CHANGE footer
chore!: drop support for Node 6

BREAKING CHANGE: use JavaScript features not available in Node 6.
# Commit message with ! to draw attention to breaking change
feat!: send an email to the customer when a product is shipped

# Commit message with scope and ! to draw attention to breaking change
feat(api)!: send an email to the customer when a product is shipped

# Commit message with both ! and BREAKING CHANGE footer
chore!: drop support for Node 6

BREAKING CHANGE: use JavaScript features not available in Node 6.

Use Option: markBreakingChangeMode

Add extra "BREAKING CHANGE" question that if you need to add the "!" mark in the header

js
// .commitlintrc.js

/** @type {import('cz-git').UserConfig} */
module.exports = {
  prompt: {
    markBreakingChangeMode: true
  }
};
// .commitlintrc.js

/** @type {import('cz-git').UserConfig} */
module.exports = {
  prompt: {
    markBreakingChangeMode: true
  }
};

Demo: demo

Use commitizen CLI + cz-git

Try running command:

sh
break=1 cz
break=1 cz

Demo: demo

Use cz-git CLI czg

Try running command:

sh
czg break
czg break

Demo: demo

I just try my best to make thing well, Could you give a star ⭐