Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
March 21, 2021 07:37 am GMT

Git commit message convention that you can follow!

Motivation of this blog is to curate all information at one place and to make more people aware about standards followed by industry.

Let's get started.....

A typical git commit message will look like

<type>(<scope>): <subject>

"type" must be one of the following mentioned below!

  • build: Build related changes (eg: npm related/ adding external dependencies)
  • chore: A code change that external user won't see (eg: change to .gitignore file or .prettierrc file)
  • feat: A new feature
  • fix: A bug fix
  • docs: Documentation related changes
  • refactor: A code that neither fix bug nor adds a feature. (eg: You can use this when there is semantic changes like renaming a variable/ function name)
  • perf: A code that improves performance
  • style: A code that is related to styling
  • test: Adding new test or making changes to existing test

"scope" is optional

"subject"

  • use imperative, present tense (eg: use "add" instead of "added" or "adds")
  • don't use dot(.) at end
  • don't capitalize first letter

Refer this link for more practical examples of commit messages

References:


Original Link: https://dev.to/intrepid_ishan/git-commit-message-convention-that-you-can-follow-1709

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To