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>…


This content originally appeared on DEV Community and was authored by Ishan Makadia

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:


This content originally appeared on DEV Community and was authored by Ishan Makadia


Print Share Comment Cite Upload Translate Updates
APA

Ishan Makadia | Sciencx (2021-03-21T07:37:38+00:00) Git commit message convention that you can follow!. Retrieved from https://www.scien.cx/2021/03/21/git-commit-message-convention-that-you-can-follow/

MLA
" » Git commit message convention that you can follow!." Ishan Makadia | Sciencx - Sunday March 21, 2021, https://www.scien.cx/2021/03/21/git-commit-message-convention-that-you-can-follow/
HARVARD
Ishan Makadia | Sciencx Sunday March 21, 2021 » Git commit message convention that you can follow!., viewed ,<https://www.scien.cx/2021/03/21/git-commit-message-convention-that-you-can-follow/>
VANCOUVER
Ishan Makadia | Sciencx - » Git commit message convention that you can follow!. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/03/21/git-commit-message-convention-that-you-can-follow/
CHICAGO
" » Git commit message convention that you can follow!." Ishan Makadia | Sciencx - Accessed . https://www.scien.cx/2021/03/21/git-commit-message-convention-that-you-can-follow/
IEEE
" » Git commit message convention that you can follow!." Ishan Makadia | Sciencx [Online]. Available: https://www.scien.cx/2021/03/21/git-commit-message-convention-that-you-can-follow/. [Accessed: ]
rf:citation
» Git commit message convention that you can follow! | Ishan Makadia | Sciencx | https://www.scien.cx/2021/03/21/git-commit-message-convention-that-you-can-follow/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.