# GIT workflow
# Working on a Task
# Prepare a branch
git checkout master
.git pull origin master
.git checkout -b ID-XXX
.git push origin ID-XXX
.- Create a Merge Request of
PROJ-XXX
to the parent branch. Add prefixDraft:
to the title if the MR is not ready to be merged.
# Finishing the task
- Remove
Draft:
prefix from the title. - 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.
# Working with Patch branches
# Preparing a branch for a patch
- Choose the latest patch version
git pull --tags
. - Checkout the tag
git checkout x.y.z
. - Make a new branch with prefix "patch-"
git checkout -b patch-x.y.z
. - Push it
git push origin patch-x.y.z
.
Apply patch to upstream as well. Push MR or use cherry-picking.
# 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 patch-x.y.z
.