Skip to content

Git Workflow

Daniel Di Sarli edited this page Jun 11, 2018 · 3 revisions

Semantic commit messages

In Notepadqq we are adopting semantic commit messages, which help to keep the git history clean and potentially to automate changelog generation.

This means that every commit on the master branch should look like the following examples:

  • fix: discard file path when performing language detection based on file name
  • chore: Add clang-formatted files to commit before completion. (#692)

In particular, these are the prefixes you can use:

  • chore: for changes related to the build system, or dependencies, or anything that only Nqq developers and maintainers care about.
    Example: chore: disallow linter failures in Travis
  • docs: for changes related to documentation (e.g. comments, API docs, ...).
    Example: docs: add documentation to sendMessage() method
  • feat: for features that users care about, either because new functionalities are introduced, or speed improvements, or similar performance gains.
    Example: feat: introduce advanced search dock
  • fix: for bug fixes.
    Example: fix: statusbar was not updating on some systems
  • refactor: for commits which do not alter behaviour in any way, but only move around or abstract pieces of code. In general, this is all stuff that users couldn't care less about.
    Example: refactor: rename x and tmp variables to more meaningful names
  • style: for code style formatting.
    Example: style: convert tabs to spaces
  • l10n: for translations.
    Example: l10n: update Italian translation
  • test: for unit tests.

Please make sure that each commit fits in one and only one of these categories. If not, consider splitting it in smaller, more meaningful commits.

Pull requests are usually squashed, so prefixes in commits within a PR are welcome but not needed, as a single prefix will be applied to the final squashed commit anyway.