- Message Format
- Message Types
- Message Scope
- Message Subject
- Message Body
- Branches
- Fetching
- Pull Request
- Merging
- Code Guideline
This is our commits messages standard. We use these standard to easily identify and differentiate which type of commit is. This pattern is to have a better and understandable messages.
Each commit message consists of a header, a body and a footer. The header has a special format that includes a type, a scope and a subject:
<type>(<scope>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>
Obs: prefer to use git commit to make bigger commit message.
These are the types of commits we can use.
feat
New featuresfix
Bug fixesdocs
Documentation Changeslint
Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)refactor
A code change that neither fixes a bug nor adds a featuretest
Adding missing testschore
Changes to the build process or auxiliary tools and libraries such as documentation generationrevert
revert previous commit (hope not use this)
we also provide
wip
type, but commits withwip
type, should be rewrited using rebase when open a pull request
Scope is what you're pretending to change, ex:
git commit -m 'feat(form): add new radio button component
The subject contains succinct description of the change:
- use the imperative, present tense: "change" not "changed" nor "changes"
- no dot (.) at the end
Just as in the subject, use the imperative, present tense: "change" not "changed" nor "changes". The body should include the motivation for the change and contrast this with previous behavior.
Always work inside a feature branch. Branch name should be based on our types, ex:
git checkout -b feat/new-radio-component
git checkout -b fix/radio-component
git checkout -b test/radio-component
git checkout -b refactor/radio-component
Prefer to use git pull --rebase
to update you local branch
New pull requests should follow this structure:
- Work on a fork
- Create a new branch based on the branch guideline
- Write the code based on our code guideline
- If the feature involves JS, be sure to unit test the feature.
- The coverage should not be lowered.
- Be sure to rebase your branch with the origin/master.
- If the feature involves directly layout, be sure to provide some visual info of it.
- The name of the pull request should match the name of the branch.
Using this approach to merge branch when pull request is approved.
git fetch origin
# from feature branch
# use -i (interactively) to review your commits, rewrite, edit then
git rebase -i origin/master
# We need to use -f because we did a rebase
git push origin feat/new-radio-component -f
# move to master
git checkout master
# use --ff-only to remove automatic merge message
git merge --ff-only feat/new-radio-component
Check our .eslintrc file for more info on our rules
Check our .stylelintrc file for more info on our rules
--
Commit Guidelines is based in: