"Better Commits" is a powerful Visual Studio Code extension that enforces standardized commit messages, ensuring convention and consistency across Git repositories. By utilizing predefined commit templates, it streamlines the commit process, promoting a unified style within development teams. Improve collaboration and project clarity with this efficient tool, creating clean, informative, and consistent commit histories effortlessly.
Each commit message embodies a:
1. category (feat, fix, docs, ...).
2. summary - provide a succinct description of the change.
Structure of the commit message:
Category | Summary |
---|---|
feat | Add a new feature |
fix | A bug fix |
docs | Documentation only changes |
style | Markup, white-space, formatting, missing semi-colons... no code change |
refactor | A code change that neither fixes a bug nor adds a feature |
perf | A code change that improves performance |
test | Adding missing tests or correcting existing tests |
chore | Update build scripts, package manager configs, etc; no production code change |
The summary consists of a concise description of the changes made:
- use the imperative, present tense: "change" not "changed" nor "changes"
- ensure first letter is not capitalized
- avoid dot (.) at the end of the summary
- recommended: limit to 50 characters
- Install the extension
- Use:
Cmd+Shift+Enter
For MacBook, andCtrl+Shift+Enter
for Windows and Linux