DEV Community

loading...

Discussion on: Git commit message convention that you can follow!

Collapse
kmhmubin profile image
K M H Mubin

Hey,
Thank you for this cool post. I learn new stuff.
So, I have a question, and It will be beneficial for me if you answer it.
I'm new to the git commit message. Here is the scenario,
"Suppose I create a new Car Class file and wrote the code inside that file. Now I want to commit this class file. "

The question is in the git commit message which type is it? (refactor or other). If possible, give an example.

Thank you for your generous answer.

Note: If I make any mistake in English, please forgive me.

Collapse
i5han3 profile image
Ishan Makadia Author

Hey
I think you shouldn't use refactor

As you are creating new Car Class from scratch. I believe that it will add some feature to your application.
As a result you can use "feat:"
OR
If you feel that "feat:" is not the exact match then you can decide your own <type> and start using it.

For Example:
EsLint have decided there own <type> for commit message. So it's totally upto you or organization you work for.

Refer ESLint:
You can see below <type> which are used by ESLint at eslint.org/docs/developer-guide/co...

Fix - for a bug fix.
Update - either for a backwards-compatible enhancement or for a rule change that adds reported problems.
New - implemented a new feature.
Breaking - for a backwards-incompatible enhancement or feature.
Docs - changes to documentation only.
Build - changes to build process only.
Upgrade - for a dependency upgrade.
Chore - for refactoring, adding tests, etc. (anything that isn't user-facing).
Enter fullscreen mode Exit fullscreen mode
Collapse
kmhmubin profile image
K M H Mubin

Thank you for your insightful information. I really appreciate it. 😊

Forem Open with the Forem app