As a lean team, so we've optimized Git-flow to be more simple and have it fits with our team size and project complexities better
We gonna have 3 primary types of branches: master branch, staging branch and features branches, which are:
-
Brach
masteris latest version of workable product. Each increaments will be merged tomasterafter sprint is finished. And it's always release-able. -
Branch
stagingis branched-off frommaster. When new iteration is started, it will reset to latestmaster's state. And dev team will use this branch to demo their work. -
Branches
featuresare likelyfeat-x,fix-y,ref-z,chore-aorfeat-add-login-form,fix-bug-on-swap-eth...
Each branch in this type, is represented for a product's improvement - which could be new feature, a bug fixing, a refactor... that include in a iteration.
They're branched-off from master, and will always check with latest master state by merging or rebasing to make sure they're compatible with product's state.
Developers will follow this process to work on features:
- Based on feature they work with, create new branch from
master, with a pre-agreed naming convention:- Jira tasks' number, E.g
TWCI-21,WP-111,GSS-53... - Features' name, E.g
feature-user-login,feature-mail-subscrition,feature-form-contact... - Grouping by type, E.g
feature/GSS-53,task/TWCI-21,bug/WP-11...
- Jira tasks' number, E.g
- Developers now will start working on new branch: code, commit, push - Classic!
- If there are changes from
master, e.g Other features being merged, then developers will need torebase/merge(we preferrebase) their working branches withmasterto get those updates (means keep sync withmaster) - When working branches are ready (completed
Definition of DONE), developers will need others review his work by creating pull-requests for their branches - those PRs will point tomaster. - Whoever do QA assurance will manually merge it to
stagingfor testing on UAT and check it's compatibility with other features. - If PR is okay, then QA will merge it to
master(PS: Hitting theMergebutton!) - If anything wrong, QA will tell branch owner to fix it.
- If there are changes from
- After iteration end, or before new iteration starts, someone will need to reset
stagingto latestmaster, in order to make sure they're in sync for up-coming features.

