# GIT workflow

# Working on a Task

# Prepare a branch

  1. git checkout master.
  2. git pull origin master.
  3. git checkout -b ID-XXX.
  4. git push origin ID-XXX.
  5. Create a Merge Request of PROJ-XXX to the parent branch. Add prefix Draft: to the title if the MR is not ready to be merged.

# Finishing the task

  1. Remove Draft: prefix from the title.
  2. Make sure you choose correct revieers.
  3. Wait for a code review.

Some projects need approve from the team leaders before deployment. Check for Deployment section in the project


# Working with Patch branches

# Preparing a branch for a patch

  1. Choose the latest patch version git pull --tags.
  2. Checkout the tag git checkout x.y.z.
  3. Make a new branch with prefix "patch-" git checkout -b patch-x.y.z.
  4. 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

  1. 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.
  2. Push the branch git push origin patch-x.y.z.
Last Updated: 4/20/2023, 12:59:18 PM