In the course of development you will be making incremental changes to your code and adding them to your repository in the form of commits! It is important that you write good commit messages to convey the intent and purpose of your changes to other developers!
A good commit message is just detailed enough and never ambiguous. Companies may or may not have requirements for commit messages, but we will be using a lightweight version of Conventional Commit messages:
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
A commit type can include:
feat
– a new feature is introduced with the changesfix
– a bug fix has occurredchore
– changes that do not relate to a fix or feature and don't modify src or test files (for example updating dependencies)refactor
– refactored code that neither fixes a bug nor adds a featuredocs
– updates to documentation such as a the README or other markdown filesstyle
– changes that do not affect the meaning of the code, likely related to code formatting such as white-space, missing semi-colons, and so on.test
– including new or correcting previous testsperf
– performance improvementsci
– continuous integration relatedbuild
– changes that affect the build system or external dependenciesrevert
– reverts a previous commitThis is also a generally good measure for how often you should be committing. If the work you are currently doing is a different type than what you are moving on to next, you should probably commit!