Git workflow
Overview
Branches
Git branches should have a meaningful name that reflects the purpose of the branch. It can follow the type/description pattern for readability but it is not a obligation.
The stable source code is hosted on main branch.
Here are some examples for other types of branches:
feat/<feature_name>fix/<bug_name>chore/<task_name>docs/<documentation_name>
Commits
The commit message must follow the Conventional Commits format.
Format of the commit message:
<type>(<scope>): <subject>
The type and scope should always be lowercase as shown below.
Allowed <type> values:
featfor a new feature for the user, not a new feature for build script. Such commit will trigger a release bumping a MINOR version.fixfor a bug fix for the user, not a fix to a build script. Such commit will trigger a release bumping a PATCH version.perffor performance improvements. Such commit will trigger a release bumping a PATCH version.docsfor changes to the documentation.stylefor formatting changes, missing semicolons, etc.refactorfor refactoring production code, e.g. renaming a variable.testfor adding missing tests, refactoring tests; no production code change.buildfor updating build configuration, development tools or other changes irrelevant to the user.chorefor updates that do not apply to the above, such as dependency updates.cifor changes to CI configuration files and scriptsrevertfor revert to a previous commit
Allowed <scope> values:
Scope is not restricted to a predefined list of values. It must reflect the part of the codebase that is being changed.
Breaking changes:
A commit introducing a breaking API change needs to append a ! after the type/scope.
Tags
The Tag is a way to identified a version and ensure that the related code is stable and deserve a release. The tag revision must follows the Semantic Versioning 2.0.0 (or SemVer) convention.
Tags must have the following format:
v<3-digits_semantic-version>
Here are some examples:
v1.0.0v1.2.3v1.0.0-alpha.1
The SemVer website provides a Regex101 Online Validator to check the compliance of the version.