# GIT workflow
# Working on a story
# Prepare a GIT branch
git checkout master
(some projects can usedevelop
for upstream).git pull origin master
git checkout -b PROJ-XXX
git push origin PROJ-XXX
- Create a Merge Request of
PROJ-XXX
to the parent branch (master
,develop
or maybehotfix-*
) with prefixDraft:
.
# Finishing the story
- Remove
Draft:
prefix from the title of Merge Request. - Make sure you choose correct revieers.
- Wait for a code review.
Some projects need approve from the team leaders before deployment. Check for Deployment section in the project
README.
# How to work with your peers on a single story
A story must be split into several sub-tasks. Everyone makes their own branch. The workflow is similar to working on a story:
- Checkout a current story branch
git checkout PROJ-XXX
. - Sync with upstream
git pull origin PROJ-XXX
. - Create a new branch with subtask name
git checkout -b PROJ-YYYY
.
# Working on patches
Only `@tracker-team` uses that workflow.
# Preparing a branch for a patch
- Pull all the tags
git pull --tags
. - Choose a version for the hotfix
git tag -l --sort=-v:refname
. - Checkout the latest patch
git checkout 9.12.4
. - Make a new branch with prefix "patch-"
git checkout -b [release|patch]-9.12.5
. - Push it
git push origin [release|patch]-9.12.5
. - Create an MR:
[release|path]-9.12.5
todevelop
. That reminds you to merge patches to the upstream.
# Cherry-picking bug-fixes from upstream
- Use
git cherry-pick
in order to collect all required bugs fixed from an upstream. E.g.:git cherry-pick ba47d721 -m 1
. Also, you can use Gitlab UI to make a cherry-pick. Open merged MR and click a cherry-pick button. - Push the branch
git push origin [relase|patch]-9.12.5
.
← On-calls Git subtrees →