Home

Awesome

VSCode Conventional Commits

Marketplace Version Installs Downloads Rating Financial Contributors on Open Collective

Conventional Commits for VSCode.

Features

This extension helps you to fill in commit message according to Conventional Commits.

Usage

Demo

You can access VSCode Conventional Commits in two ways:

  1. Command + Shift + P or Ctrl + Shift + P, enter Conventional Commits, and press Enter.
  2. Click the icon on the Source Control menu. See the image below.

Icon on the Source Control menu

Extension Configuration

namedescriptiondefault
conventionalCommits.autoCommitControl whether the extension should commit files after: forming the message or closing the editor tab.<br>When #git.enableSmartCommit# enabled and #git.smartCommitChanges# was set to all, It allows to commit all changes when there are no staged changes.<br>And set #git.postCommitCommand# to sync to run git.sync after commit.true
conventionalCommits.emojiFormatSpecify which format will be shown in the gitmoji.code
conventionalCommits.gitmojiControl whether the extension should prompt for a gitmoji.true
conventionalCommits.lineBreakSpecify which word will be treated as line breaks in the body.<br>Blank means no line breaks.""
conventionalCommits.promptBodyControl whether the extension should prompt for the body section.true
conventionalCommits.promptFooterControl whether the extension should prompt for the footer section.true
conventionalCommits.promptCIControl whether the extension should prompt for skipping CI run.false
conventionalCommits.promptScopesControl whether the extension should prompt for the scope section.true
conventionalCommits.scopesSpecify available selections in the scope section.[]
conventionalCommits.showEditorControl whether the extension should show the commit message as a text document in a separate tab.false
conventionalCommits.showNewVersionNotesControl whether the extension should show the new version notes.true
conventionalCommits.silentAutoCommitControl that auto commit should be silent, without focusing source control panel.false
conventionalCommits.editor.keepAfterSaveControl whether the extension should keep the editor tab open after saving the commit message.false
conventionalCommits.storeScopesGloballyControl whether the extension should store the defined scopes within your user settings. Uncheck to store in workspace settings.false

Commit Workflow

The recommended workflow automatically add, commit and push files by default.

If you want the extension to only fill in the message, disable autoCommit configuration.

The Recommended Workflow

  1. Active the extension.
  2. Type messages.

The extension will automatically add the changed files, perform the commit and push the commit to remote.

How To Configure autoCommit

  1. Enable Settings > conventionalCommits.autoCommit configuration of the extension. The extension enables Settings > conventionalCommits.autoCommit by default.
  2. Enable Settings > git.enableSmartCommit and set Settings > git.smartCommitChanges to all to commit all changes when there are no staged changes.
  3. Set Settings > git.postCommitCommand to sync to run git.sync after commit.

Supported Commitlint Rules

FAQ

Q: How do I add a line break in messages?

A: Set lineBreak configuration to \n. When you're typing, enter \n as a line break.

image

Or \\n in JSON format.

image

Q: How do I resolve repo not found error?

A: See issue discussion #15.

Q: How do I use commitlint in showEditor mode?

A: The extension - vscode-commitlint will helpful!

Troubleshooting

  1. Switch to the VSCode OUTPUT tab, select Conventional Commits.
  2. Copy all the output. Before sharing it, make sure you have removed all private information.

Debug instruction

Contribution

  1. The vscode task needs to install the extension - vscode-tsl-problem-matcher.
  2. The effect of code changes needs to reactivate the extension. Just restart the task.

Team Members

Financial Contributors

Become a financial contributor and help us sustain our community. [Contribute]

Individuals

<a href="https://opencollective.com/vscode-conventional-commits"><img src="https://opencollective.com/vscode-conventional-commits/individuals.svg?width=890"></a>

Organizations

Support this project with your organization. Your logo will show up here with a link to your website. [Contribute]

<a href="https://opencollective.com/vscode-conventional-commits"><img src="https://opencollective.com/vscode-conventional-commits/organization.svg?width=890"></a>

Related Projects