- Do not commit directly to main
- Can only go from your branch PR to main
- Create a PR with a reviewer named Ms. Minh or Mr. Diep. After it is approved, it will be merged into main branch
-
Create branch
feature|documentfrom main -
Commit the code to your
new branch -
Create a pull request from the your branch to
main, tag and set a reviewer as a team member. At least 1 approval is required for 'Squash And Merge' to go into main
-
Create a
new branchfrommain -
Branch name must be in the form:
<category>/?<reference>/<description-in-kebab-case>- In there:
- category:
feature,bugfix,hotfix,refactor,style,test,document - reference:
issue/ticket,pr,no-ref - description-in-kebab-case: brief description of the changed content, lower case, separated by
-
- category:
- In there:
-
Ex:
git branch feature/issue-42/create-new-button-component -
Ex:
git branch bugfix/issue-342/button-overlap-form-on-mobile -
Ex:
git branch bugfix/pr-42/fix-button-component
-
Commit code to
new branch -
The commit name must be in the form:
<category: do something; do some other things>- In there:
- category:
feat,fix,refactor,chore
- category:
- In there:
-
featis for adding a new feature -
fixis for fixing a bug -
refactoris for changing code for performance or convenience purpose (e.g. readability) -
choreis for everything else (writing documentation, formatting, adding tests, cleaning useless code etc.) -
Ex:
git commit -m "feat: add new button component; add new button components to templates" -
Ex:
git commit -m 'fix: add the stop directive to button component to prevent propagation' -
Ex:
git commit -m 'refactor: rewrite button component in TypeScript' -
Ex:
git commit -m 'chore: write button documentation'