Collaborative Development
Index
Common Branches
- master(main): The main version branch, usually used as the production branch, and protected to prevent direct commits.
- develop(dev): The development branch, where feature branches' code is merged for development and testing. This branch typically progresses quickly.
- release(rel): The pre-release branch, which is the branch before going live. It generally keeps pace with the master branch.
- feature(feat): Feature branches, where different features or functionalities are developed.
- bugfix(hotfix): Branches used for urgent bug fixes or critical functionality changes for the production environment.
Commit Conventions
The commit messages should follow a standard convention to describe the type and purpose of the current commit.
- feat: New feature or functionality.
- fix: Bug fix.
- docs: Documentation update.
- style(format): Code formatting changes.
- revert: Rollback commit.
Standard Workflow
ใNoteใ
Here, we explain using the master
, develop
, release
, and feature
branches.
- Pull the latest
master
branch and create your feature branch from it for daily development. - Always ensure that your local
master
,develop
,release
, andfeature
branches are up to date. (Frequent updates and ensure the latest version before merging) - Develop the
new feature
in your feature branch. - Merge the
feature
branch into thedevelop
branch and push thedevelop
branch to the remote repository. - Test the code on the develop branch. If there are issues, repeat steps 4 and 5 until no issues remain.
- Merge the
feature
branch into therelease
branch (resolve conflicts if any), push therelease
branch, and perform pre-release testing. - Test the code on the
release
branch. If there are issues, repeat steps 6 and 7 until no issues remain. - Submit a PR (MR) to merge from the release branch into the master branch.