For production code only. The main branch, is supposed to be behind the develop branch.
git checkout main
For all development, testing etc. For larger commits/changes, create a feature branch. For small fixes and non-breaking stuff, commit directly.
git checkout develop
Use a feature branch for implementing larger compontens.
Use git flow feature start MYFEATURE
where MYFEATURE is the branch name. Eg. "UI-refactor", "database" etc.
When finishing a feature, it gets merged with the develop branch.
git flow feature finish MYFEATURE
To get code, from develop
to main
, do the following:
git checkout develop
--* Enter the develop branchgit merge main
--_ Mergemain
branch intodevelop
. This ensures that potential conflicts gets resolved in develop. If theres no conflict, proceed. --_ Update version inpackage.json
to a newer version.git checkout main
&git merge develop
Build runs on:
- Changes to version in package.json
- Main branch
Build runs on:
- Every change
- Develop branch
Test