gitversion-controlkarma-runnercommit-messageconventional-commits

When to use "chore" as type of commit message?


What is the use of chore in semantic version control commit messages? Other types like feat or fix are clear, but I don't know when to use "chore".

Can anyone provide a couple of examples of its use?

Another maybe not related question: What's the proper type of commit messages for modifying files like .gitignore?


Solution

  • You can see a short definition in "Git Commit Msg":

    chore: updating grunt tasks etc; no production code change

    It is used in:

    Modifying the .gitignore would be part of the "chores".

    "grunt task" means nothing that an external user would see:

    Although Owen S mentions in the comments:

    Looking at the Karma page you link to, I suspect that grunt task may refer specifically to Javascript's build tool grunt.
    In which case, they probably didn't have in mind changes involving implementation or private internal methods, but rather tool changes, configuration changes, and changes to things that do not actually go into production at all.
    (Our shop currently uses it for those, and also for simple refactoring.)


    2024: the Conventional Commits specification references the Angular convention, since the Angular project has many examples of commits starting with chore(...):.

    chore was defined as:

    chore: Other changes that don't modify src or test files.

    And yet, in 2020, conventionalcommits.org issue 303 asked:

    What do you think of not recommending a chore commit type as it was removed from Angular Convention in 2017?

    ('chore' is still visible in the Google doc "AngularJS Git Commit Message Conventions" from Vojta Jina and Igor Minar)

    That Angular commit did include:

    Note that this PR removes support for "chore" which was previously overused by everyone on the team.


    As part of the aforementioned "conventional commit" standard RedJue/git-commit-plugin also defines chore as:

    Changes to the build process or auxiliary tools and libraries such as documentation generation

    Example of a chore commit: applying a linter.