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

Alireza Mirian picture Alireza Mirian · Nov 15, 2014 · Viewed 53.8k times · Source

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 messages of commits for modifying files like .gitignore?

Answer

VonC picture VonC · Nov 15, 2014

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:

  • implementation (of an existing feature, which doesn't involve a fix),
  • configuration (like the .gitignore or .gitattributes),
  • private internal methods...

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.)