gitcommitgit-commitconventionsconventional-commits

What should be the right "commit type" from conventional commit?


I created a commit with the purpose to unhide a feature, the code change is to only uncomment some lines of code and show the feature, so now the feature will be displayed to the user.

Should this commit type be feat or chore?

I think it should be chore because it doesn‘t add the feature to the code, only allows it to be displayed, but from user POV it is a new feature, what is your opinion?


Solution

  • Neither, according Convential Commits you need refactor:

    A code change that neither fixes a bug nor adds a feature

    More information about other semantic commit types you can read here.

    Most of the types can‘t be clearly assigned, and therefore have leeway and can also be used differently in the team, according to the specifications.

    So this question can‘t be answered definitively, in general. Then in my team, for example, we only use feat, fix or chore as commit-convention. And if we unlock an already implemented feature (feature-toggle), a feat-commit message is created in the respective branch.