Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Questions about conventional commit messages in git

I'm trying to adapt to conventional commit messages, described in this article.

Here's a snippet from the article:

Allowed <type> values:

feat (new feature)
fix (bug fix)
docs (changes to documentation)
style (formatting, missing semi colons, etc; no code change)
refactor (refactoring production code)
test (adding missing tests, refactoring tests; no production code change)
chore (updating grunt tasks etc; no production code change)

But sometimes there are changes w/c are hard to categorize into this types. I'll list some of changes w/c i find confusing on what type to use

What types should i use in this cases

  1. I added a css style on an existing component(react, angular, vue, etc)
  2. I edited configuration files in my project such as package.json, .prettierc, etc.
  3. Renaming a file
  4. Deleting a file
like image 604
The.Wolfgang.Grimmer Avatar asked Dec 18 '25 22:12

The.Wolfgang.Grimmer


1 Answers

Here's the more detailed conventional commit types:

  • build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
  • ci: Changes to our CI configuration files and scripts (examples: CircleCi, SauceLabs)
  • docs: Documentation only changes
  • feat: A new feature
  • fix: A bug fix
  • perf: A code change that improves performance
  • refactor: A code change that neither fixes a bug nor adds a feature
  • test: Adding missing tests or correcting existing tests

For each of your questions, I've put the type I'd use under it.

I added a css style on an existing component(react, angular, vue, etc)

feat

I edited configuration files in my project such as package.json, .prettierc, etc.

build

Renaming a file

refactor, potentially add BREAKING CHANGE

Deleting a file

refactor, potentially add BREAKING CHANGE

like image 132
icc97 Avatar answered Dec 20 '25 16:12

icc97



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!