-
Notifications
You must be signed in to change notification settings - Fork 8
Gitflow
According to gitflow, we use two main branches:
- master, which contains production-ready code that can be deployed at any arbitrary point in time
- develop, which include the most recent published changes needed for the next release
- May branch off from:
develop
- Must merge back into:
develop
- Branch naming convention:
feature/<ISSUE_KEY>
(e.g.feature/PEO-14
)
Feature branches are used to develop new features for the upcoming or a distant future release. Each feature branch is used to implement a single task.
- May branch off from:
develop
- Must merge back into:
develop
andmaster
- Branch naming convention:
release/<VERSION>
(e.g.release/1.0.1
)
Release branches support the preparation of a new production release. They allow for minor bug fixes and preparing metadata for a release (version number, build dates, etc.).
- May branch off from:
master
- Must merge back into:
develop
andmaster
- Branch naming convention:
hotfix/<VERSION>
(e.g.hotfix/1.0.2
)
This branch is created for handling emergencies − it allows to fix something in production quickly.
- May branch off from:
release
ordevelop
- Must merge back into:
release
ordevelop
- Branch naming convention:
bugfix/<ISSUE_KEY>
(e.g.bugfix/PEO-23
)
These branches are created in case the release requires bug fixes.
We follow semantic versioning forgiving versions to the release
and hotfix
branches. Each version contains three version numbers − MAJOR.MINOR.PATCH
. Here's what each of them means:
- MAJOR - code is incompatible or contains significant changes
- MINOR - code has been changed, but the changes are backward compatible
- PATCH - bug fixes have been made
- all commit message follows guidelines
- never make commits to the
master
branch - one task, one
feature
branch - new functions must be added only to the
develop
branch
It must contain the description of the task and a link to the task from the task management tool. Also, a pull request should be opened at any time (even if work is not finished) to discuss changes with the team.
Mail rules to follow:
- always open a pull request on the first day you started working on a task
- you need to push new changes to a remote repository on a daily basis
- always mark your pull request with the appropriate label
- assign team members for review, when changes are done
- use squash and merge type for merging all pull requests
- delete branch after the pull request is merged
Use labels to mark your pull request type:
FEATURE
RELEASE
BUGFIX
HOTFIX
Use labels to mark your pull request state:
WIP
NEED REVIEW
REVIEWED
HOLD
- All changes were tested by the author of the pull request
- Make a self-review before sending a pull request to code review
After all the changes are performed and tests passed successfully, add NEED REVIEW
label to pull request. The idea behind Code Review is not only to find bugs but to get all team acquainted with a new code.
Each pull request must have enough approves to be merged into the branch:
-
bugfix
- a minimum of 2 approver required -
feature
- a minimum of 2 approver required -
hotfix
- a minimum of 2 approver required